Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.programmer > #5131
| From | Kaz Kylheku <kaz@kylheku.com> |
|---|---|
| Newsgroups | comp.sys.mac.system, comp.unix.programmer |
| Subject | Re: Case sensitive file system? |
| Followup-To | comp.unix.programmer |
| Date | 2014-02-16 03:19 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <20140215190913.4@kylheku.com> (permalink) |
| References | <chine.bleu-1E20C5.19082615022014@news.eternal-september.org> |
Cross-posted to 2 groups.
Followups directed to: comp.unix.programmer
On 2014-02-16, Siri Cruz <chine.bleu@yahoo.com> wrote: > Is there a simple way in a program to see if a file system uses case sensitive > names (like traditional Unix) or case irrelevant (like plain old HFS+)? Make a temporary directory in that filesystem, and there create a file "fOO" or some such mixed-case identifier. If you can open it as "foo", the system is case-insensitive. Then list the directory. If the name lists as "fOO", then it is case-preserving. If it appears as "foo" or "FOO", it is case folding. Is there are nondestructive way to just find out this info? I don't think so. There is nothing *standard* out of pathconf or fstat. Mac OS/Darwin evidently has a _PC_CASE_SENSITIVE constant that can be used with pathconf. You could detect this in a C program with #ifdef to implement the test more efficiently. It appears there is also a _PC_CASE_PRESERVING. I'd detect these individually to short-circuit the relevant parts of the logic, such that if both are provided, then no temporary modification of the filesystem takes place. -- Music DIY Mailing List: http://www.kylheku.com/diy ADA MP-1 Mailing List: http://www.kylheku.com/mp1
Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Case sensitive file system? Siri Cruz <chine.bleu@yahoo.com> - 2014-02-15 19:08 -0800
Re: Case sensitive file system? Ian Collins <ian-news@hotmail.com> - 2014-02-16 16:15 +1300
Re: Case sensitive file system? Kaz Kylheku <kaz@kylheku.com> - 2014-02-16 03:19 +0000
Re: Case sensitive file system? Jolly Roger <jollyroger@pobox.com> - 2014-02-16 03:29 +0000
Re: Case sensitive file system? David Ritz <dritz@mindspring.com> - 2014-02-15 22:28 -0600
Re: Case sensitive file system? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-02-16 06:05 +0000
Re: Case sensitive file system? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-02-16 09:18 -0500
Re: Case sensitive file system? Michael Vilain <vilain@NOspamcop.net> - 2014-02-15 23:28 -0800
Re: Case sensitive file system? Siri Cruz <chine.bleu@yahoo.com> - 2014-02-16 04:24 -0800
Re: Case sensitive file system? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-02-16 09:17 -0500
Re: Case sensitive file system? Ian Zimmerman <itz@buug.org> - 2014-03-01 10:59 -0800
Re: Case sensitive file system? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2014-03-01 19:46 +0000
Re: Case sensitive file system? Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2014-03-02 07:53 -0700
Re: Case sensitive file system? Kaz Kylheku <kaz@kylheku.com> - 2014-03-02 18:19 +0000
Re: Case sensitive file system? Michael Vilain <vilain@NOspamcop.net> - 2014-03-02 12:37 -0800
Re: Case sensitive file system? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-03-02 20:23 -0500
Re: Case sensitive file system? scott@slp53.sl.home (Scott Lurndal) - 2014-03-03 15:06 +0000
Re: Case sensitive file system? Casper H.S. Dik <Casper.Dik@OrSPaMcle.COM> - 2014-03-03 15:10 +0000
Re: Case sensitive file system? scott@slp53.sl.home (Scott Lurndal) - 2014-03-03 16:59 +0000
Re: Case sensitive file system? Tim Streater <timstreater@greenbee.net> - 2014-03-03 15:18 +0000
csiph-web