Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #56574

Re: Case sensitive file system?

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

Show all headers | View raw


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.sys.mac.system | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-02-16 01:01 -0500
      Re: Case sensitive file system? Barry Margolin <barmar@alum.mit.edu> - 2014-02-16 02:14 -0500
        Re: Case sensitive file system? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-02-16 16:56 -0500
      Re: Case sensitive file system? Jolly Roger <jollyroger@pobox.com> - 2014-02-16 15:53 +0000
        Re: Case sensitive file system? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-02-16 17:01 -0500
    Re: Case sensitive file system? Lewis <g.kreme@gmail.com.dontsendmecopies> - 2014-02-16 06:08 +0000
      Re: Case sensitive file system? Jolly Roger <jollyroger@pobox.com> - 2014-02-16 15:49 +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? 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