Re: NSFileManager and directories
Re: NSFileManager and directories
- Subject: Re: NSFileManager and directories
- From: Tito Ciuro <email@hidden>
- Date: Thu, 4 Sep 2003 10:02:10 +0200
Francisco ,
The following snippet has been copied from the documentation:
NSArray *subpaths;
BOOL isDir;
NSString *fontPath = @"/System/Library/Fonts";
NSFileManager *manager = [NSFileManager defaultManager];
if ([manager fileExistsAtPath:fontPath isDirectory:&isDir] && isDir)
subpaths = [manager subpathsAtPath:fontPath];
-- Tito
On jueves, sept 4, 2003, at 09:25 Europe/Paris, Francisco Tolmasky
wrote:
Is saying something like
NSArray *contents;
if(contents= [[NSFileManager defaultManager] directoryContentsAtPath:
aPath])
//do directory stuff
else
//do file stuff
a safe way to tell if the object at "aPath" is a directory or not?
Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
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.
_______________________________________________
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.