--- On Mon, 8/18/08, Nicolas Goles <[EMAIL PROTECTED]> wrote:

>             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.

1. Are you sure that manager == [NSFileManager defaultManager]? I would just 
write the call to NSFileManager explicitly.

2. Are you sure that [[NSFileManager defaultManager] fileExistsAtPath:fullPath] 
== YES? Like perhaps there's somehow a shell expansion character like a tilde 
sneaking in there that NSFileManager doesn't deal with?

Cheers,
Chuck


      
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to