/ Published in: Objective C
This can be used to test FS type.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
int main (int argc, const char * argv[]) { struct statfs fsInfo; NSLog(@"Testing %s", argv[1]); if (statfs(argv[1], &fsInfo) == -1) { NSLog(@"Error %s", argv[1]); } if (fsInfo.f_flags & MNT_RDONLY) { NSLog(@"Read only %s", argv[1]); } NSLog(@"Type %s", fsInfo.f_fstypename); [pool release]; return 0; }
URL: http://www.cocoabuilder.com/archive/message/cocoa/2006/5/18/163842