File attributes

The x::fileattr object provides access to file attributes, specifically:

An explicitly constructed x::fileattr object provides attributes of an existing file or a directory. This is a reference to a reference counted subclass of x::basic_attr, which defines the interface described in this section. Additionally, x::fd objects are also subclassed from x::basic_attr, and implement the same methods for an open file descriptor:

#include <x::attr.H>

x::fd fd;

// ...

x::fileattr filenameAttr(x::fileattr::create("filename", true));

filenameAttr->stat(); // The stat() system call on an existing file

// ...
fd->stat(); // The fstat() system call on an open file descriptor