From: Bronek Kozicki (brok_at_[hidden])
Date: 2006-08-21 08:36:44
Yitzhak Sapir <yitzhak.sapir_at_[hidden]> wrote:
>> Any national characters can be used in a filename. For details see:
> 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
-- Remove -trap- when replying. Usun -trap- gdy odpisujesz.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk