Class MaeStat
#include <MaeStat.h >
Akin to the libc struct stat (see lstat(2)), this structure holds details about a MAE VFS resource.
string name |
MAE resource name |
string spoke |
MAE spoke where resource is accessed |
string osfilename |
Actual filename in spoke's filesystem (if it's an acutal file) |
string type |
Resource type, e.g. file, dfile, dir, pipe, etc (see tioreg) |
long uid |
Owner / user id - User record id |
long inode |
Virtual Inode number (actually FSNode record number) |
long dev |
Id of device (actually IORegistry record number) or 0 |
long size |
Size of resource in bytes, if known; -1 otherwise |
time_t atime |
Last access time |
time_t mtime |
Last modification time |
string access |
Accessibility, e.g. r, w, rw |
string status |
Error message concerning resource |
int lastErrno |
Error code related to resource |
Constructor with optional db table record id.
@param id - db table record id; 0 for empty record
const HashArray& data |
key-value pairs with property names as keys |
Constructor with input from HashArray.
Reset/Clear the contents of this instance
Determine if this instance has valid data or not.
Return value: true if valid; flase if not valid
Return the base filename - just the filename without the directory
Return value: the filename
Get the MAE resource name. For an app created file, this will be the parent dir resource.
Return value: MAE resource name
Get the MAE spoke where resource is accessed.
Return value: the spoke name
Get the Actual filename in spoke's filesystem (if it's an acutal file)
Return value: the actual OS filename
Determine if this is a directory
Return value: true if it's a directory, false if not
Determine if this is a file
Return value: true if it's a file, false if not
Determine if this is a pipe to another program running. This is true of a pipe and a ptty.
Return value: true if it's a pipe, false if not
Determine if this is a socket. This is true of a Unix domain socket, a UDP connection, or a TCP connection.
Return value: true if it's a socket, false if not
Determine if this is a special file (not a directory or regular file).
A special file may be a serial port, pipe to a program, a socket, etc.
Return value: true if it's a special file, false if not
Determine if this is a link.
Return value: true if it's a special file, false if not
Get the value of Resource type, e.g. file, dfile, dir, pipe, etc (see tioreg).
Return value: the value of type
Get Linux-equivalent mode bits for file. The port type and access are combined to produce this.
Return value: mode bits, e.g. -rw-rw-rw- or dr-xr-xr-x or crw-rw-rw-
Get the value of Owner / user id - User record id.
Return value: the value of uid
Get the value of Virtual Inode number (actually FSNode record number).
Return value: the value of inode
Get the value of Id of device (actually IORegistry record number) or 0.
Return value: the value of dev
Get the value of Size of resource in bytes, if known; -1 otherwise.
Return value: the value of size
Get the value of Last access time.
Return value: the value of atime
Get the value of Last access time.
Return value: the value of atime
Get the value of Last modification time.
Return value: the value of mtime
Get the value of Last modification time.
Return value: the value of mtime
Get the value of Accessibility, e.g. r, w, rw.
Return value: the value of access
Determine if the status is OK for this node
Return value: true if status is OK or false if it is not OK
Get the value of Error message concerning resource
Return value: the value of status
Get the value of Error code related to resource
Return value: the value of lastErrno
const string& newname |
the new value for name |
Set the value of MAE resource name.
Return value: the updated instance of MaeStat
const string& newspoke |
the new value for spoke |
Set the value of MAE spoke where resource is accessed.
Return value: the updated instance of MaeStat
const string& newfilename |
the new value for osfilename |
Set the value of Actual filename in spoke's filesystem (if it's an acutal file)
Return value: the updated instance of MaeStat
const string& newtype |
the new value for type |
Set the value of Resource type, e.g. file, dfile, dir, pipe, etc (see tioreg).
Return value: the updated instance of MaeStat
long newuid |
the new value for uid |
Set the value of Owner / user id - User record id.
Return value: the updated instance of MaeStat
long newinode |
the new value for inode |
Set the value of Virtual Inode number (actually FSNode record number).
Return value: the updated instance of MaeStat
long newdev |
the new value for dev |
Set the value of Id of device (actually IORegistry record number) or 0.
Return value: the updated instance of MaeStat
long newsize |
the new value for size |
Set the value of Size of resource in bytes, if known; -1 otherwise.
Return value: the updated instance of MaeStat
time_t newatime |
the new value for atime |
Set the value of Last access time.
Return value: the updated instance of MaeStat
time_t newmtime |
the new value for mtime |
Set the value of Last modification time.
Return value: the updated instance of MaeStat
const string& newaccess |
the new value for access |
Set the value of Accessibility, e.g. r, w, rw.
Return value: the updated instance of MaeStat
const string& newstatus |
the new value for status |
Set the value of Error message concerning resource
Return value: the updated instance of MaeStat
int newerrno |
the new value for lastErrno |
Set the value of Error code related to resource
Return value: the updated instance of MaeStat
const HashArray& data |
Given a set of x properties in key-value pairs, initialize this instance with them.
This is complementary to toHashArray().
Return value: the initialized instance of x
Convert this instance's data into a HashArray.
This is the complement of set()
@param forDB - false to include Id; true to exclude Id, which is handy for sending to Datastore
Return value: a HashArray of instance's properties
Convert this instance's data to XML.
@param forDB - false to include Id; true to exclude Id, which is handy for sending to Datastore
Return value: a XMLData of instance's properties