Published in: Objective C
URL: http://www.cocoabuilder.com/archive/message/cocoa/2006/5/18/163842
This can be used to test FS type.
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; }
You need to login to post a comment.
