Re: NSFileManager fileAttributesAtPath confusion
Re: NSFileManager fileAttributesAtPath confusion
- Subject: Re: NSFileManager fileAttributesAtPath confusion
- From: Lorenzo Puleo <email@hidden>
- Date: Fri, 07 Mar 2003 08:31:22 +0100
Hi,
what doesn't work? You didn't specify.
Is "attributes" = null?
Does the file "path" exists?
Is the parent folder of the file "path" readable?
Is the file "path" readable?
Can you read the file "path" with e.g. stringWithContentsOfFile?
Please note that you wrote "sting..." instead of "stringWith..."
>
Hey Everyone,
>
>
Ive got a small problem here where I am trying to get the size of file
>
at a path. The problem is when I change the path to a pointer(?).
>
>
NSDictionary *attributes = [[NSFileManager defaultManager]
>
fileAttributesAtPath:@"/tmp/somefile" traverseLink:NO];
>
>
This works perfectly fine for me however the path to the file is not
>
static so I am trying this with no luck.
>
>
NSString *path = [NSString
>
stingWithContentsOfFile:@"/tmp/filewithpathinfo"];
>
NSDictionary *attributes = [[NSFileManager defaultManager]
>
fileAttributesAtPath:path traverseLink:NO];
>
NSLog(@"%@", path);
>
>
I was just using hte NSLog to check if the path was right and it
>
reports the right path to the file like /Volumes/backup/somefile
>
>
Any thoughts?
>
>
Chris Long
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.