NUL in file names verified [was Re: Why exception from os.path.exists()?]

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Jun 11 01:05:22 EDT 2018


Straight from the horse's mouth, Apple's HFS Plus volumes do indeed
support NULs in file names. Quote:


    Indirect node files exist in a special directory called the
    metadata directory. This directory exists in the volume's root
    directory. The name of the metadata directory is four null
    characters followed by the string "HFS+ Private Data".


and:

    The case-insensitive Unicode string comparison used by
    HFS Plus and case-insensitive HFSX sorts null characters
    after all other characters, so the metadata directory
    will typically be the last item in the root directory.
    On case-sensitive HFSX volumes, null characters sort
    before other characters, so the metadata directory will
    typically be the first item in the root directory.


https://developer.apple.com/library/archive/technotes/tn/tn1150.html#HFSPlusNames




-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson




More information about the Python-list mailing list