FX::FXStat Class Reference

#include <FXStat.h>

List of all members.


Detailed Description

Statistics about a file or directory.

Public Types

enum  MetaFileFlags {
  IsFile, IsDirectory, IsLink, IsCompressed,
  IsHidden
}

Public Member Functions

FXuint mode () const
FXfval size () const
FXDEPRECATEDEXT FXuint user () const
FXDEPRECATEDEXT FXuint group () const
FXTime modified () const
FXTime accessed () const
FXTime created () const
FXTime touched () const
bool isHidden () const
bool isFile () const
bool isLink () const
bool isCharacter () const
bool isBlock () const
bool isSocket () const
bool isFifo () const
bool isDirectory () const
bool isReadable () const
bool isWritable () const
bool isExecutable () const
bool isOwnerReadWriteExecute () const
bool isOwnerReadable () const
bool isOwnerWritable () const
bool isOwnerExecutable () const
bool isGroupReadWriteExecute () const
bool isGroupReadable () const
bool isGroupWritable () const
bool isGroupExecutable () const
bool isOtherReadWriteExecute () const
bool isOtherReadable () const
bool isOtherWritable () const
bool isOtherExecutable () const
bool isSetUid () const
bool isSetGid () const
bool isSetSticky () const

Static Public Member Functions

static bool readMetadata (const FXString &path, FXuint *FXRESTRICT flags, FXfval *FXRESTRICT size, FXTime *FXRESTRICT created, FXTime *FXRESTRICT lastModified, FXTime *FXRESTRICT lastAccessed, FXfval *FXRESTRICT compressedSize=0, FXuint *FXRESTRICT hardLinks=0)
static void writeMetadata (const FXString &path, const FXTime *created, const FXTime *lastModified, const FXTime *lastAccessed)
static FXuint metaFlags (const FXString &path)
static bool statFile (const FXString &file, FXStat &info)
static bool statLink (const FXString &file, FXStat &info)
static FXuint mode (const FXString &file)
static bool mode (const FXString &file, FXuint perm)
static bool exists (const FXString &file)
static FXfval size (const FXString &file)
static FXTime modified (const FXString &file)
static FXTime accessed (const FXString &file)
static FXTime created (const FXString &file)
static FXTime touched (const FXString &file)
static bool isHidden (const FXString &file)
static bool isFile (const FXString &file)
static bool isLink (const FXString &file)
static bool isDirectory (const FXString &file)
static bool isReadable (const FXString &file)
static bool isWritable (const FXString &file)
static bool isExecutable (const FXString &file)
static bool isOwnerReadWriteExecute (const FXString &file)
static bool isOwnerReadable (const FXString &file)
static bool isOwnerWritable (const FXString &file)
static bool isOwnerExecutable (const FXString &file)
static bool isGroupReadWriteExecute (const FXString &file)
static bool isGroupReadable (const FXString &file)
static bool isGroupWritable (const FXString &file)
static bool isGroupExecutable (const FXString &file)
static bool isOtherReadWriteExecute (const FXString &file)
static bool isOtherReadable (const FXString &file)
static bool isOtherWritable (const FXString &file)
static bool isOtherExecutable (const FXString &file)
static bool isSetUid (const FXString &file)
static bool isSetGid (const FXString &file)
static bool isSetSticky (const FXString &file)

Friends

class FXFile

Member Enumeration Documentation

File size.

Holds meta information about data

Enumerator:
IsFile  Is a file.
IsDirectory  Is a directory.
IsLink  Is a symbolic link.
IsCompressed  Is compressed.
IsHidden  Is hidden.


Member Function Documentation

static bool FX::FXStat::readMetadata ( const FXString path,
FXuint *FXRESTRICT  flags,
FXfval *FXRESTRICT  size,
FXTime *FXRESTRICT  created,
FXTime *FXRESTRICT  lastModified,
FXTime *FXRESTRICT  lastAccessed,
FXfval *FXRESTRICT  compressedSize = 0,
FXuint *FXRESTRICT  hardLinks = 0 
) [static]

Returns metadata for path. This is the fastest way to read this kind of information as it can be all performed at once, or avoiding bits not required. Returns false if an error occurred.

static void FX::FXStat::writeMetadata ( const FXString path,
const FXTime created,
const FXTime lastModified,
const FXTime lastAccessed 
) [static]

Stamps the path entry with the specified metadata. Needed to work around the Windows "file tunnelling" misfeature. This function can throw an exception.

static FXuint FX::FXStat::metaFlags ( const FXString path  )  [static]

Returns the flags part of readMetadata().

static bool FX::FXStat::statFile ( const FXString file,
FXStat info 
) [static]

Get statistics of the file into the stat buffer info.

static bool FX::FXStat::statLink ( const FXString file,
FXStat info 
) [static]

Get statistice of the link into the stat buffer info.

FXuint FX::FXStat::mode (  )  const [inline]

Get statistics of already open file into stat buffer info.

Return the mode flags for this file

FXfval FX::FXStat::size (  )  const [inline]

Return file size in bytes.

FXDEPRECATEDEXT FXuint FX::FXStat::user (  )  const [inline]

Return user number.

FXDEPRECATEDEXT FXuint FX::FXStat::group (  )  const [inline]

Return group number.

FXTime FX::FXStat::modified (  )  const [inline]

Return time when last modified.

FXTime FX::FXStat::accessed (  )  const [inline]

Return time when last accessed.

FXTime FX::FXStat::created (  )  const [inline]

Return time when file was created.

FXTime FX::FXStat::touched (  )  const

Return time anything was changed.

bool FX::FXStat::isHidden (  )  const

Return true if it is a hidden file (Windows-only).

bool FX::FXStat::isFile (  )  const

Return true if it is a regular file.

bool FX::FXStat::isLink (  )  const

Return true if it is a link.

bool FX::FXStat::isCharacter (  )  const

Return true if character device.

bool FX::FXStat::isBlock (  )  const

Return true if block device.

bool FX::FXStat::isSocket (  )  const

Return true if socket device.

bool FX::FXStat::isFifo (  )  const

Return true if fifo (pipe) device.

bool FX::FXStat::isDirectory (  )  const

Return true if input path is a directory.

bool FX::FXStat::isReadable (  )  const

Return true if file is readable.

bool FX::FXStat::isWritable (  )  const

Return true if file is writable.

bool FX::FXStat::isExecutable (  )  const

Return true if file is executable.

bool FX::FXStat::isOwnerReadWriteExecute (  )  const

Return true if owner has read-write-execute permissions.

bool FX::FXStat::isOwnerReadable (  )  const

Return true if owner has read permissions.

bool FX::FXStat::isOwnerWritable (  )  const

Return true if owner has write permissions.

bool FX::FXStat::isOwnerExecutable (  )  const

Return true if owner has execute permissions.

bool FX::FXStat::isGroupReadWriteExecute (  )  const

Return true if group has read-write-execute permissions.

bool FX::FXStat::isGroupReadable (  )  const

Return true if group has read permissions.

bool FX::FXStat::isGroupWritable (  )  const

Return true if group has write permissions.

bool FX::FXStat::isGroupExecutable (  )  const

Return true if group has execute permissions.

bool FX::FXStat::isOtherReadWriteExecute (  )  const

Return true if others have read-write-execute permissions.

bool FX::FXStat::isOtherReadable (  )  const

Return true if others have read permissions.

bool FX::FXStat::isOtherWritable (  )  const

Return true if others have write permissions.

bool FX::FXStat::isOtherExecutable (  )  const

Return true if others have execute permissions.

bool FX::FXStat::isSetUid (  )  const

Return true if the file sets the user id on execution.

bool FX::FXStat::isSetGid (  )  const

Return true if the file sets the group id on execution.

bool FX::FXStat::isSetSticky (  )  const

Return true if the file has the sticky bit set.

static FXuint FX::FXStat::mode ( const FXString file  )  [static]

Return the mode flags for this file.

static bool FX::FXStat::mode ( const FXString file,
FXuint  perm 
) [static]

Change the mode flags for this file.

static bool FX::FXStat::exists ( const FXString file  )  [static]

Return true if file exists.

static FXfval FX::FXStat::size ( const FXString file  )  [static]

Return file size in bytes.

static FXTime FX::FXStat::modified ( const FXString file  )  [static]

Return last modified time for this file, on filesystems where this is supported. This is the time when any data in the file was last modified.

static FXTime FX::FXStat::accessed ( const FXString file  )  [static]

Return last accessed time for this file, on filesystems where this is supported.

static FXTime FX::FXStat::created ( const FXString file  )  [static]

Return created time for this file, on filesystems where this is supported. This is also the time when ownership, permissions, links, and other meta-data may have changed.

static FXTime FX::FXStat::touched ( const FXString file  )  [static]

Return touched time for this file, on filesystems where this is supported. This is the time when anything at all, either contents or meta-data, about the file was changed.

static bool FX::FXStat::isHidden ( const FXString file  )  [static]

Return true if file is hidden.

static bool FX::FXStat::isFile ( const FXString file  )  [static]

Return true if input path is a file name.

static bool FX::FXStat::isLink ( const FXString file  )  [static]

Return true if input path is a link.

static bool FX::FXStat::isDirectory ( const FXString file  )  [static]

Return true if input path is a directory.

static bool FX::FXStat::isReadable ( const FXString file  )  [static]

Return true if file is readable.

static bool FX::FXStat::isWritable ( const FXString file  )  [static]

Return true if file is writable.

static bool FX::FXStat::isExecutable ( const FXString file  )  [static]

Return true if file is executable.

static bool FX::FXStat::isOwnerReadWriteExecute ( const FXString file  )  [static]

Return true if owner has read-write-execute permissions.

static bool FX::FXStat::isOwnerReadable ( const FXString file  )  [static]

Return true if owner has read permissions.

static bool FX::FXStat::isOwnerWritable ( const FXString file  )  [static]

Return true if owner has write permissions.

static bool FX::FXStat::isOwnerExecutable ( const FXString file  )  [static]

Return true if owner has execute permissions.

static bool FX::FXStat::isGroupReadWriteExecute ( const FXString file  )  [static]

Return true if group has read-write-execute permissions.

static bool FX::FXStat::isGroupReadable ( const FXString file  )  [static]

Return true if group has read permissions.

static bool FX::FXStat::isGroupWritable ( const FXString file  )  [static]

Return true if group has write permissions.

static bool FX::FXStat::isGroupExecutable ( const FXString file  )  [static]

Return true if group has execute permissions.

static bool FX::FXStat::isOtherReadWriteExecute ( const FXString file  )  [static]

Return true if others have read-write-execute permissions.

static bool FX::FXStat::isOtherReadable ( const FXString file  )  [static]

Return true if others have read permissions.

static bool FX::FXStat::isOtherWritable ( const FXString file  )  [static]

Return true if others have write permissions.

static bool FX::FXStat::isOtherExecutable ( const FXString file  )  [static]

Return true if others have execute permissions.

static bool FX::FXStat::isSetUid ( const FXString file  )  [static]

Return true if the file sets the user id on execution.

static bool FX::FXStat::isSetGid ( const FXString file  )  [static]

Return true if the file sets the group id on execution.

static bool FX::FXStat::isSetSticky ( const FXString file  )  [static]

Return true if the file has the sticky bit set.


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:17:30 2008 for TnFOX by doxygen v1.5.6