Problem with fileAttributesAtPath
Problem with fileAttributesAtPath
- Subject: Problem with fileAttributesAtPath
- From: "Nicolas Goles" <email@hidden>
- Date: Mon, 18 Aug 2008 15:24:02 -0400
Hi guys, I am trying to get fileAttributesAtPath using this code: (files
contains the path to the directory that was enumerated )
while(object = [dirEnumerator nextObject])
{
//First We craft the whole path for a single object
NSString *fullPath = [files stringByAppendingString:object];
NSLog(@"%@",fullPath); //Log the full path just to be sure it's
correct
if(!fullPath)
{
NSLog(@"Error when appending strings");
}
//Try to obtain fileAttributes
NSDictionary *fileAttributes = [manager
fileAttributesAtPath:fullPath traverseLink:NO];
if( fileAttributes != nil)
{
NSString *filetype = [fileAttributes
objectForKey:NSFileType];
NSLog(@"%@",filetype);
}
if(!fileAttributes)
{
NSLog(@"it's nill");
}
}
The thing is that my fileAttributes it's always = nil so I always get "it's
nill" on the console.
Could anyone point me at what I'm doing wrong ???
Thanks!! :)
--
-Nicolas Goles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden