tags:

views:

42

answers:

1

Hi,

How can one trace the content of a directory? The directory here refers to non home and non current directory. Explicitly, I have three directories

  1. 10.5.8 - current directory
  2. Development
  3. Backup

So, how can I undergo file operation like create, accessing or deleting on Development or Backup directory other than my current directory?

Regards, Lenin

+1  A: 

Your terminology is hard to understand. Do you mean you want to monitor a folder (and its children) for changes, read/modify folders/files to which you don't have permission, or both?

To monitor for changes, check out the FSEvents API.

To obtain permission to perform a privileged operation, check out the Authorization Services API.

Joshua Nozzi
Say when i created a file it automatically creates in working directory, but i want to create in other directory in my system.
iSight
It's still not clear what you want to do.
Rob Keniger
Referring to my question, my current working directory is 10.5.8, but i want to create a new file in development directory. How can i carry out that. Is it fine.
iSight
I think I understand what you're asking. Do you mean general file and folder operations like new, delete, move, copy? NSFileManager will handle the moves/copies/deletes, as well as "new folder". To create new files, it depends on what you want to do. -[NSString writeToFile:atomically:] will create a text file ... you'll need to be a lot more specific. Please try rephrasing (rather than repeating) your question.
Joshua Nozzi
Thanks for your valuable suggestion. But any way i will make it out.
iSight