Boost logo

Boost Users :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-11-19 14:28:52


At 03:51 PM 11/15/2004, Pete wrote:
>I'm not sure if I'm missing something or not, but I couldn't find
>anything in the filesystem documentation that allows one to retrieve
>file/directory attributes such as:
>
>Date created/last accessed/last modified
>Hidden
>System
>Read Only
>Link
>Etc.
>
>I'm particularly interested in portable file date accessors (hoping to
>find methods in the path class returning boost::posix_time::ptime). Are
>there any known workarounds?

The last_write_time() function supplies the last modified date/time.

The symbolic_link_exists() helps with symlinks.

The bulk of the other attributes you mention are not currently supported by
the filesystem library because we don't know a portable way to do so, even
just between Wiindows and POSIX, let alone other systems. We've talked a
lot about identifying some set of POSIX attributes that would sensibly map
into a "read_only" query function, but no one has stepped forward to
actually do a trial implementation.

HTH,

--Beman


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