Boost logo

Boost Users :

Subject: Re: [Boost-users] Mapped Drives and Boost::Filesystem
From: Conrad Mercer (cmercer_at_[hidden])
Date: 2008-12-02 20:24:49


Conrad Mercer wrote:
Hi,

I am trying to use Boost::Filesystem to copy files to and from a mapped network drive e.g. X:\SomeFolder. When trying to do this boost::filesystem does not recognise it as a valid folder. It fails exists and is_directory. I have also tried using system_complete to see if this would generate me a valid path, unfortunately not. I am using WindowsXP and i'm wondering if anyone has run into a similar problem? or if there is a concrete reason why the mapped drive is not recognised  as a valid folder.

thanks

Conrad Mercer
Hi,

Just a followup to my original question as I have solved the problem myself and thought I would add the solution here for posterity. As far as I can tell boost::filesystem does not work with mapped drives under WindowsXP at all. It simply thinks they don't exist. However using a full UNC path to whatever resource you are after always works. So in short I guess, don't use mapped network drives, just use the full path and you will have no problems. The reason I was keen to get this working with mapped drives as it solved the probelm of authenticating to the network drives in question, however I have since fixed that problem so all is well.

Conrad

--


Conrad_Mercer.png

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net