Re: Detecting case-sensitivity of a filesystem
Re: Detecting case-sensitivity of a filesystem
- Subject: Re: Detecting case-sensitivity of a filesystem
- From: Pelle Johansson <email@hidden>
- Date: Tue, 10 Apr 2007 08:33:09 +0200
(sorry for double-send, wrong email on previous)
10 apr 2007 kl. 00.57 skrev Nathaniel Gray:
Is there any non-hackish way to detect the case-sensitivity of a
filesystem, like a system call? statvfs doesn't appear to do it
and statfs doesn't help either (case-sensitive and case-insensitive
hfs+ have the same f_type and f_fstypename). Or is there no
avoiding the "create foo, open Foo" hack?
diskutil seems to get this information from statfs, according to
ktrace (the only relevant syscalls I could find). I'm not sure if
it's part of Darwin, but in that case maybe you can simply parse it's
output? The text it outputs comes from /System/Library/Filesystems/
hfs.fs/Contents/Resources/English.lproj/InfoPlist.strings or (less
likely) /System/Library/Filesystems/hfs.fs/Contents/Info.plist, so
you might have to watch out for localisation.
--
Pelle Johansson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden