osx - How to find the format of a disk volume -
i updating backup utility have written , have on mac app store.
in macintosh cocoa application, how find how disk volume formatted? official thing find, doing getresourcevalue: 'nsurlvolumelocalizedformatdescriptionkey', language dependent.
my utility not back upwards volumes formatted fat32. utility needs special handling xsan drives.
statfs(2)
give non-localized name:
struct statfs volinfo; if(statfs("/path/to/your/volume", &volinfo) != 0) { perror("statfs"); homecoming -1; } fprintf(stderr, "%s\n", volinfo.f_fstypename);
see /system/library/filesystems
names returned in f_fstypename
.
osx cocoa disk
No comments:
Post a Comment