• 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
getFileSystemInfoForPath troubles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getFileSystemInfoForPath troubles


  • Subject: getFileSystemInfoForPath troubles
  • From: stupidFish programming <email@hidden>
  • Date: Mon, 3 Feb 2003 15:54:31 +0100

hi,

i have the below function set up, but everytime it gets called, for any
volume it gives the correct BOOL values for removableFlag, writableFlag
and unmountableFlag but always returns nil for both description and
fileSystemType. Is this intended behavior, or am i doing something
wrong?

thanks for your time,
Ben

- (void)doDiskChecking:(id)sender
{
NSArray* mountedLocalVolumes = [[NSArray
arrayWithArray:[[NSWorkspace sharedWorkspace] mountedLocalVolumePaths]]
retain];
NSLog(@"%@", mountedLocalVolumes);

int kamu;

for (kamu=0; kamu<[mountedLocalVolumes count];kamu++)
{
BOOL removableFlag, writableFlag, unmountableFlag;
NSString* description;
NSString* fileSystemType;

if([[NSWorkspace sharedWorkspace]
getFileSystemInfoForPath:[mountedLocalVolumes objectAtIndex:kamu]
isRemovable:&removableFlag isWritable:&writableFlag
isUnmountable:&unmountableFlag description:&description
type:&fileSystemType])
{
if(removableFlag)
{
NSLog(@"%@ is removable", [mountedLocalVolumes objectAtIndex:kamu]);
}
else
{
NSLog(@"%@ not removable", [mountedLocalVolumes objectAtIndex:kamu]);
}
if(writableFlag)
{
NSLog(@"%@ is writable", [mountedLocalVolumes objectAtIndex:kamu]);
}
else
{
NSLog(@"%@ not writable", [mountedLocalVolumes objectAtIndex:kamu]);
}
if(unmountableFlag)
{
NSLog(@"%@ is unmountable", [mountedLocalVolumes objectAtIndex:kamu]);
}
else
{
NSLog(@"%@ not unmountable", [mountedLocalVolumes
objectAtIndex:kamu]);
}
if(description != nil)
{
NSLog(description);
}
else
{
NSLog(@"no description available for %@", [mountedLocalVolumes
objectAtIndex:kamu]);
}
if(fileSystemType != nil)
{
NSLog(fileSystemType);
}
else
{
NSLog(@"no file system type available for %@", [mountedLocalVolumes
objectAtIndex:kamu]);
}
}
}
}
_______________________________________________
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.

  • Prev by Date: NSFileSystemFreeSize troubles
  • Next by Date: Some NSImageRep wonderings and problems
  • Previous by thread: Re: NSFileSystemFreeSize troubles
  • Next by thread: Some NSImageRep wonderings and problems
  • Index(es):
    • Date
    • Thread