Re: [boost] Boost.Filesystem i18n mini-review

This is not (yet) a review, but I use your filesystem library in several unicode projects and am very interested in the wide char implementation. I have tried wpath and wpath_directory_iterator with two projects and run in several minor problems: - Building I can't build the DLLs on my system (Windows XP SP2, VC 7.1): path.cpp(51) : error C2491: 'boost::filesystem::wpath_traits::imbue' : definition of dllimport function not allowed Static builds run fine. - fstream.hpp: Declaration of function narrow_path(const std::wstring & file_ph, ...) If several filesystem fstream objects are declared in different translation units, the linker complains this symbol as multiple defined. Adding an inline specifier helps as workaround. - fstream.hpp: Implementation of function narrow_path(const std::wstring & file_ph, ...) This function doesn't work at all on my system, it returns always the empty string. Why is this 8.3 conversion needed, can this work on NTFS reliable? Replacing the current implementation thru a simple narrow conversion helps as workaround. - is_symlink() Why isn't this function implemented on Windows? A NTFS junction is symlink, isn't it? After fixing the above problems the library seems to run fine. Thank you for your work! Jan

Jan Hermelink wrote:
- fstream.hpp: Implementation of function narrow_path(const std::wstring & file_ph, ...) This function doesn't work at all on my system, it returns always the empty string. Why is this 8.3 conversion needed, can this work on NTFS reliable?
No. 8.3 aliases are optional on NTFS and turning them off improves the performance of the file system, sometimes significantly. The narrow path should probably be obtained via WideCharToMultiByte with CP_ACP or CP_OEMCP, depending on whether AreFileApisANSI returns true, but there's no guarantee that it will be useful for opening the file.

Peter Dimov wrote:
No. 8.3 aliases are optional on NTFS and turning them off improves the performance of the file system, sometimes significantly.
Do you have any links to documentation on this (MSDN or whatever?) I didn't realise you could disable that feature and would be interested to read about the advantages/disadvantages of doing so. Cheers Russell

Russell Hind wrote:
Peter Dimov wrote:
No. 8.3 aliases are optional on NTFS and turning them off improves the performance of the file system, sometimes significantly.
Do you have any links to documentation on this (MSDN or whatever?) I didn't realise you could disable that feature and would be interested to read about the advantages/disadvantages of doing so.
I've never done this myself, but see for example http://support.microsoft.com/kb/q121007/
participants (3)
-
Jan Hermelink
-
Peter Dimov
-
Russell Hind