|
Boost Users : |
From: Luca Cappa (luca.cappa_at_[hidden])
Date: 2007-04-26 09:34:16
Hello,
On Thu, 26 Apr 2007 12:23:30 +0200, Jeff <jeff_j_dunlap_at_[hidden]> wrote:
> Hello,
>
> I can see from a FileSystem example how to check for the existence of a
> directory. What I would like to be able to do is to check for the
> existence of
> a file but I couldn't figure out how to do it using exists().
Simply:
path filepath;// this is a path to a file
if (exists(filepath) && !is_directory(filepath))
{
... the file is there
}
else
{
...the file is not in there, or it is a directory.
}
Greetings,
Luca
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