Subject: [boost] [filesystem] Windows long paths (and also API differences)
From: Adam Badura (abadura_at_[hidden])
Date: 2009-09-08 07:01:09
In a simple test program I used create_directories with long path
(longer then MAX_PATH being equal to 260 on my machine).
ANSI version (for char) threw an exception but before reaching MAX_PATH
(somewhere around 255 characters however I did not test exactly).
UNICODE version (for wchar_t) created as many directories as it could
(as many as would make ANSI version not throw) and skipped rest without
This seems bad. Why is it so? And is the MAX_PATH file system limitation
on Windows or is it just a limitation for some API functions?
Also by the way I wanted to ask why signatures of many functions differ
from the documentation. For example no function takes error code parameter
and thus always throws on failure (excluding the above example...). In some
places I would prefer to have that parameter instead. Also copy_file does
not take the third parameter allowing it to do replacing.
Why is it so?
I am using Boost 1.39 (1.40 does not work for me somehow, when I try to
use it it gives compilation errors as I already mentioned in a previous
thread) and Visual Studio 2005 on Vista machine.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk