Hi all,
Im having a problem whereby I need to keep track of a few files on the system that my application keeps a URL reference to. The problem I am having is that I can't get any notification when these files are moved.
I tried the code below but it isn't working, the delegate methods never get called.
Im having a problem whereby I need to keep track of a few files on the system that my application keeps a URL reference to. The problem I am having is that I can't get any notification when these files are moved.
I tried the code below but it isn't working, the delegate methods never get called.
Code:
- (void)awakeFromNib
{
NSFm=[NSFileManager defaultManager];
[NSFm setDelegate:self];
NSLog(@"Delegate %@", [NSFm delegate]);
}
- (void)fileManager:(NSFileManager *)manager willProcessPath:(NSString *)path{
NSLog(@"File manager%@",manager);
}
- (BOOL)fileManager:(NSFileManager *)fileManagershouldMoveItemAtPath:(NSString *)srcPathtoPath:(NSString *)dstPath {
NSLog(@"File manager");
return YES;
}