I do have even more weird issues with NSFileManager:

With NSFileManager I've created a file in the temporary directory. Attempting 
to delete it, fails:

            NSFileManager* fm = [[NSFileManager alloc] init];
            NSLog(@"tmp file: %@", [_input1000 path]);
            BOOL isDirectory;
            if ([fm fileExistsAtPath:[_input1000 path] 
isDirectory:&isDirectory] || isDirectory) {
                NSError* error;
                if ([fm removeItemAtURL:_input1000 error:&error] == NO) {
                    NSLog(@"ERROR: tear down testing environment with error: 
%@", error);
                }
            }

Console:

tmp file: 
/var/folders/m9/5p__qm3967qchc9_26tl85km0000gn/T/RelaxTest/input1000.txt

ERROR: tear down testing environment with error: Error 
Domain=NSCocoaErrorDomain Code=4 "The file “input1000.txt” doesn’t exist." 
UserInfo=0x10011e700 
{NSURL=/var/folders/m9/5p__qm3967qchc9_26tl85km0000gn/T/RelaxTest/input1000.txt}


The file exists actually, and there are no issues regarding permissions.


Terminal:

~$ cd /var/folders/m9/5p__qm3967qchc9_26tl85km0000gn/T/RelaxTest
mb:RelaxTest$ ls -al
total 8
drwxr-xr-x  3 me  staff   102 29 Okt 10:05 .
drwx------  9 me  staff   306 29 Okt 10:44 ..
-rw-r--r--  1 me  staff  1000 29 Okt 10:44 input1000.txt
mb:RelaxTest$ more input1000.txt 
0123456789012345678901234567890123...6789
mb:RelaxTest$




Any hints?

Thanks in advance!

Andreas



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to