Am 11.01.2010 um 17:17 schrieb James Bucanek:

> Another suggestion: ask filesystem questions on the filesystem-dev list 
> (<http://lists.apple.com/mailman/listinfo/filesystem-dev>). The people on 
> this list are filesystem geniuses, but some have publicly admitted that they 
> can't keep up with Cocoa-dev -- for which I sympathize.

Thanks, guys! I owe you one, because I would have never checked out statfs on 
my own.

Even if not exactly on topic here's my solution after I browsed the source of 
FSFormatName.c at 
<http://opensource.apple.com/source/libfs/libfs-9/FSFormatName.c> (just for the 
archive):

#include <sys/mount.h>
struct statfs fsInfo;
int fsSubtype;
                        
if (statfs([path cStringUsingEncoding:NSASCIIStringEncoding], &fsInfo) == 0)
{
#ifdef _DARWIN_FEATURE_64_BIT_INODE
    fsSubtype = fsInfo.f_fssubtype;
#else
    fsSubtype = fsInfo.f_reserved1;
#endif
    ...
}

Afterwards I can easily compare fsSubtype:

0 = FAT 12
1 = FAT 16
2 = FAT 32

Thanks again, Matthias
 _______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to