Boost logo

Boost Users :

From: Simon Hammett (Simon.Hammett_at_[hidden])
Date: 2004-03-23 11:50:10


IIRC,

We had a similar problem in one of our apps with GetFileAttributesA. The
solution was to switch to FindFirstFile, FindClose, giving raise to the
suspicion that some implementations of GetFileAttributes are broken.

Regards, Simon.

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Sebastian
Orfino
Sent: 23 March 2004 16:07
To: boost-users_at_[hidden]
Subject: [Boost-users] boost::filesystem::exists() & GetfileAttributesA

Hi,

    I am experiencig a problem with exists() and its Windows
implementation
with GetFileAttributes API. I am using exists() prior to the scan of a
directory to see if it exists; the fact is that on W2K (just tested it
on
that OS) after a day or two GetFileAttributesA() returns
INVALID_FILE_ATTRIBUTES but the path does exists (it is a UNC-style
path).
After a restart of the app, all works fine.
    So, should I use exists() this way ? I don't know why not. Or just
use
directory_iterator and scan the hot-folder right away catching any
exceptions ?. I don't want to iterate over a direcotry that doesn't
exists
if I could knew that in advance; besides, I don't know if that will work
anyway.
    Does anyone know somthing about this
GetFileAttributesA/boost::exists()
behavior ?

Thanks in advance,
Sebastian.

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users

**************** Confidentiality Notice & Disclaimer ******************
Information in this message (including attachments) is confidential and may be legally privileged. It is intended solely for the person to whom it is addressed. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. If you receive this transmission in error, please notify the sender and then delete this e-mail immediately. Any views or opinions presented are solely those of the author and do not necessarily represent those of Computair Limited. E-mails received by employees of Computair Limited may be monitored and read by employees other than those to whom it is addressed.


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