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: Stefan Pantos <email@hidden>
- Date: Fri, 12 Jul 2002 21:55:00 +0000
I'm using the fileWrappers method to get the array of NSFileWrappers as
I need them any why. I'll have a look at NSFileManager for doing any
directors which have this problem.
Thanks,
Stefan Pantos
On Friday, July 12, 2002, at 08:49 pm, petite_abeille wrote:
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.