
Yitzhak Sapir <yitzhak.sapir@actimize.com> wrote:
Any national characters can be used in a filename. For details see: http://msdn.microsoft.com/library/en-us/fileio/fs/naming_a_file.asp
article is obsolete for new versions of Windows, the filesystem is expected to cover all or as many as possible versions.
which one of many Windows filesystems the Boost.Filesystem library implementation should depend on? Question mark is disallowed in the current version of NTFS, but what about FAT or other filesystems attached via IFS (eg. http://www.fs-driver.org/ )? The same point applies to other platforms. It is not library's job to judge which name is valid and which one is not, unless there are some well-documented platform specific limitations. And the link above points to those. The rest is what exceptions are for.
I quoted one article that dealt with up to NT versions, and one that dealt with Windows 2000. The XP system I use does not allow "?" in the middle of the filename (it returned error code 123).
it does not mean much, unless you try all more or less current versions of Windows with all filesystems they can work with - including those implemented by 3rd parties (just like Ext2 IFS above).
The idea is that the only way to identify all possible legal file names, may be to use the CreateFileW function itself.
Yes and no - there are platform specific limtations that apply to any filesystem attached to the machine you run your program on, and there are also filesystem specific limitations. I have nothing against library enforcing platform specific limitations, however it should not try to enforce limitations that not always apply - instead just go and try to create the file, and report error (presumably via exception) if that fails. B. -- Remove -trap- when replying. Usun -trap- gdy odpisujesz.