Re: Determining the canonical case for a file name on HFS+
Re: Determining the canonical case for a file name on HFS+
- Subject: Re: Determining the canonical case for a file name on HFS+
- From: Adam Nohejl <email@hidden>
- Date: Sat, 3 Dec 2005 16:36:17 +0100
2005/12/02 v 1:59, Rehan Rizvi:
Hello Camillo,
You wrote:
"I need to know this for the purpose of comparison, and I cannot
simply do a case-insensitive comparison because I do not know if /
folder/ is on a case-insensitive or case-sensitive volume."
I was just wondering, what is stopping you from finding out what
kind of
volume it is?
The information is there in the volume header. If you want to find out
more about volume headers you can do a search on the
developer.apple.com
for "tn 1150" or HFSPlusVolumeHeader.
This is not a good solution, because:
1. Other file systems can be case-insensitive too (FAT for instance).
2. There can be other equivalent names with the same case, in HFS for
instance composed vs decomposed Unicode - "a\314\201" and "\303\241"
is the same file name (represents aacute).
And of course if you're comparing paths you've got from the user,
"a/.///./../a/./b" and "a/b" is also the same file.
--
Adam Nohejl
Loki Software
mailto:email@hidden
http://lokisw.com
_______________________________________________
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