Hello,
I'm hoping someone could suggest a way that I could automatically "observe" changes in a filesystem with a UITableView.
I have a UITableView populated with the contents of files in my directory.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSFileManager *manager = [NSFileManager defaultManager];
NSArray *fileList = [manager directoryContentsAtPath:documentsDirectory];
I then use this array in cellForRowAtIndexPath to display items. Now, if I add support for deleting items, there's an added step necessary: I have to both delete the physical file and update my array.
There's got to be a better way but I can't find it despite much searching.
Thanks!