Standards: filesystem: Difference between revisions

From wikinotes
(No difference)

Revision as of 01:53, 19 May 2018

filenames

Information Source
ntfs https://msdn.microsoft.com/en-us/library/aa365247.aspx
posix http://pubs.opengroup.org/onlinepubs/9699919799/nframe.html

ntfs

char_range        = '^[a-zA-Z0-9{}]+'.format(re.escape('_ .()'))
invalid_filenames = (
                     ['CON', 'PRN', 'AUX', 'NUL', 'CLOCK', '..', '.']
                   + ['COM{}'.format(i) for i in range(1, 10)]
                   + ['LPT{}'.format(i) for i in range(1, 10)]
)

posix

char_range        = '^[a-zA-Z0-9{}]+'.format(re.escape('_ .()'))
invalid_filenames = ['..', '.']