• 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
NSWorkspace File System Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWorkspace File System Methods


  • Subject: NSWorkspace File System Methods
  • From: Joe Muscara <email@hidden>
  • Date: Thu, 17 Jan 2002 11:28:37 -0600

I have two questions regarding this subject.

First, I'm calling getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:
type: and according to the NSWorkspace documentation, *type* should return an NSString that "indicates the file system type; values could be "HFS," "UFS," or other values." But for both this value and the NSString returned by description, all I get is "nil" (the 'value' shown in the PB Debug pane becomes 0x0 after the call). The three BOOLs return expected values.

I declare the NSStrings thusly

NSString *description;
NSString *fileSystemType;

and then call the method above like this (other declarations left out for clarity)

[workspace getFileSystemInfoForPath:diskPath
isRemovable:&removableFlag
isWritable:&writableFlag
isUnmountable:&unmountableFlag
description:&description
type:&fileSystemType];

Any suggestions to what I might be doing wrong, or is there some bug?

My second question is that I want my app to update when there's a change to the file system (disk mount/unmount, etc.). I would think that the right method to use would be fileSystemChanged, but damned if I can figure out how. I mean, where do I put it in my app? If it were a delegate method, I'd know, but maybe I've been doing those too long lately. Sorry if this is a "duh."

TIA,
Joe


  • Follow-Ups:
    • Re: NSWorkspace File System Methods
      • From: Douglas Davidson <email@hidden>
    • Re: NSWorkspace File System Methods
      • From: Eric Peyton <email@hidden>
  • Prev by Date: Re: path names with spaces
  • Next by Date: Re: setting up multiple reps for an image...
  • Previous by thread: Re: CocoaCreateMovie QT sample not creating movies (for me)
  • Next by thread: Re: NSWorkspace File System Methods
  • Index(es):
    • Date
    • Thread