• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting the contenst of a mount point with a NSFileWrapper
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Getting the contenst of a mount point with a NSFileWrapper
      • From: Georg Tuparev <email@hidden>
    • Re: Getting the contenst of a mount point with a NSFileWrapper
      • From: Stefan Pantos <email@hidden>
References: 
 >Getting the contenst of a mount point with a NSFileWrapper (From: Stefan Pantos <email@hidden>)

  • Prev by Date: Getting the contenst of a mount point with a NSFileWrapper
  • Next by Date: Re: Getting the contenst of a mount point with a NSFileWrapper
  • Previous by thread: Getting the contenst of a mount point with a NSFileWrapper
  • Next by thread: Re: Getting the contenst of a mount point with a NSFileWrapper
  • Index(es):
    • Date
    • Thread