FROM : Joannou Ng
DATE : Wed Apr 13 03:22:36 2005
Hi Luc,
I use the value of f_fstypename in the statfs struct to determine
volume format for an app that I wrote that only targeted Xsan volumes.
What specific information are you looking for?
Cheers, Joannou.
On 2005 Apr 12, at 20:22, Luc Vandal wrote:
> Hi,
>
> I've been looking for a way to get information about volumes
> (removable, CD, FW, iPod, HD, etc.). So far I've been using
> getFileSystemInfoForPath and statfs but unless I'm not using the
> correctly, I don't really get any information about what I'm looking
> for.
>
> Here's the code I'm using:
>
> while (file = [enumerator nextObject])
> {
> NSString* strFile = [NSString stringWithFormat:@"%s%s", "/Volumes/",
> [file cString]];
>
> [[NSWorkspace sharedWorkspace] getFileSystemInfoForPath:strFile
> isRemovable:&bIsRemovable isWritable:&bIsWritable
> isUnmountable:&bIsUnmountable description:&strDesc type:&strType];
> [enumerator skipDescendents];
>
> struct statfs b;
>
> statfs( [strFile cString], &b );
>
> NSDictionary* dir = [enumerator directoryAttributes];
>
> [self addVolume:file icon:@"VOL"];
> }
>
> First, strDesc and strType are always null. Is there anything helpful
> in the statfs struct that could help me find the information I'm
> looking for?
>
> Thanks!
>
> Luc _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
DATE : Wed Apr 13 03:22:36 2005
Hi Luc,
I use the value of f_fstypename in the statfs struct to determine
volume format for an app that I wrote that only targeted Xsan volumes.
What specific information are you looking for?
Cheers, Joannou.
On 2005 Apr 12, at 20:22, Luc Vandal wrote:
> Hi,
>
> I've been looking for a way to get information about volumes
> (removable, CD, FW, iPod, HD, etc.). So far I've been using
> getFileSystemInfoForPath and statfs but unless I'm not using the
> correctly, I don't really get any information about what I'm looking
> for.
>
> Here's the code I'm using:
>
> while (file = [enumerator nextObject])
> {
> NSString* strFile = [NSString stringWithFormat:@"%s%s", "/Volumes/",
> [file cString]];
>
> [[NSWorkspace sharedWorkspace] getFileSystemInfoForPath:strFile
> isRemovable:&bIsRemovable isWritable:&bIsWritable
> isUnmountable:&bIsUnmountable description:&strDesc type:&strType];
> [enumerator skipDescendents];
>
> struct statfs b;
>
> statfs( [strFile cString], &b );
>
> NSDictionary* dir = [enumerator directoryAttributes];
>
> [self addVolume:file icon:@"VOL"];
> }
>
> First, strDesc and strType are always null. Is there anything helpful
> in the statfs struct that could help me find the information I'm
> looking for?
>
> Thanks!
>
> Luc _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Luc Vandal | Apr 13, 02:22 | |
| Joannou Ng | Apr 13, 03:22 | |
| Luc Vandal | Apr 13, 03:57 | |
| Greg | Apr 13, 04:04 | |
| Luc Vandal | Apr 13, 04:33 | |
| Simon Bovet | Jun 22, 14:05 |






Cocoa mail archive

