Цитата: DarkRaider от 12.08.2019 02:45:43\n\n
Вы, любезный, наверное, удивитесь, но NTFS полностью соответствует стандарту POSIX 1003.1
Если не верится почитайте описание. Люблю это волшебное слово POSIX. Вот как только вижу - сразу понимаю - это не в тапки срать! Это серьёзно! Стандарты, однако! Заклинание из этого слова безотказно действующее расслабляюще на всех неофитов и вызывающее смиренное покачивание головой в знак уважения у старожил.
Вы это серьезно? Вы знаете про что этот POSIX 1003.1? Читали
соответсвующий документ и/или предшествовавшие ему выпуски? Сомневаюсь. Вы по диагонали глянули в перевод какой-то рекламной муйни от микрософ, котороый Вам подсунул гугль.
Вот Вам
стандарт, почитайте и больше не хамите.
Цитата со страницы 60:
Цитата3.170 Filename
A sequence of bytes consisting of 1 to {NAME_MAX} bytes used to name a file. The bytes composing the name shall not contain the or characters. In the context of a pathname, each filename shall be followed by a or a character; elsewhere, a filename followed by a character forms a string (but not necessarily a character string). The filenames dot and dot-dot have special meaning. A filename is sometimes referred to as a ``pathname component’’. See also Section 3.271 (on page 76).
Цитата со страницы 76:
Цитата3.271 Pathname
A string that is used to identify a file. In the context of POSIX.1-2017, a pathname may be limited to {PATH_MAX} bytes, including the terminating null byte. It has optional beginning characters, followed by zero or more filenames separated by characters. A pathname can optionally contain one or more trailing characters. Multiple successive characters are considered to be the same as one , except for the case of exactly two
leading characters.
Note:
If a pathname consists of only bytes corresponding to characters from the portable filename character set (see Section 3.282, on page 79), characters, and a single terminating character, the pathname will be usable as a character string in all supported locales; otherwise, the pathname might only be a string (rather than a character string). Additionally, since the single-byte encoding of the character is required to be the same across alllocales and to not occur within a multi-byte character, references to a character within a pathname are well-defined even when thepathname is not a character string. However, this property does not necessarily hold for the remaining characters within the portable filename character set.
Короче, в имени файла и пути к файлу допустимы все символы за исключением двух -- '/' и '\0'. При этом имена '.' и '..' представляют собой ссылку на текущий каталог и родительский, соответственно. Иными словами, имя файла, состоящее только из пробелов валидно.
А теперь эксперимент. У Вас есть под рукой виндовс с разделом NTFS? Создайте в каком-нибудь каталоге файлы с именами (валидными в контексте Std. IEEE 1003.1):
"...", " ..", ".. "или " ".
":::"
"\\\"
"c:\windows\system32\cmd.exe"
"c:\windows\system32\cmd.exe "
"c:\windows\system32\cmd.exe "
Расскажите нам о результатах.
У меня на POSIX-совместимой системе они такие: