Re: Getting the contenst of a mount point with a NSFileWrapper
Re: Getting the contenst of a mount point with a NSFileWrapper
- Subject: Re: Getting the contenst of a mount point with a NSFileWrapper
- From: petite_abeille <email@hidden>
- Date: Fri, 12 Jul 2002 22:49:50 +0200
On Friday, July 12, 2002, at 11:33 , Stefan Pantos wrote:
I'm trying to get the contents of a directory. Now I have a piece of
code which does this using an NSFileWrapper but it doesn't work when
the path is a mount point such as "/" or "/Volumes/VolumeName/". The
NSFileWrapper isn't created and the init method used returns NULL. Also
there are no exceptions raised during it's constructions. Why is this
and how can I get round it?
You mean NSFileManager? NSFileWrapper does not really have any file
enumeration methods in it. Except if you consider initWithPath as being
"good enough".
Also from a path how can I get which volume it is on? I want to be able
to get the name of the volume which root is basted on.
If you don't mind AppKit, what about:
NSWorkspace
- (NSArray *)mountedLocalVolumePaths;
- (NSArray *)mountedRemovableMedia;
- (NSArray *)mountNewRemovableMedia;
- (BOOL)getFileSystemInfoForPath:(NSString *)fullPath isRemovable:(BOOL
*)removableFlag isWritable:(BOOL *)writableFlag isUnmountable:(BOOL
*)unmountableFlag description:(NSString **)description type:(NSString
**)fileSystemType;
Cheers,
PA.
_______________________________________________
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.