NFileInfo Class Reference

NFileInfo is utility class for obtaining file information. More...

Inheritance diagram for NFileInfo:

NObject

List of all members.

Public Member Functions

 NFileInfo (const NString &path)
 Constructs a NFileInfo object.
 ~NFileInfo (void)
 Destroys a NFileInfo object.
bool isFile (void) const
 Tests whether the object is a file.
bool isDir (void) const
 Tests whether the object is a directory.
bool isDevice (void) const
 Tests whether the object is a device.
bool isFifo (void) const
 Tests whether the object is a fifo.
bool isLink (void) const
 Tests whether the object is a link.
bool exists (void) const
 Tests whether the object exists.
bool ownerRead (void) const
 Tests whether the object is readable by the owner.
bool groupRead (void) const
 Tests whether the object is readable by the group.
bool othersRead (void) const
 Tests whether the object is readable by others.
bool ownerWrite (void) const
 Tests whether the object is writable by the owner.
bool groupWrite (void) const
 Tests whether the object is writable by the group.
bool othersWrite (void) const
 Tests whether the object is writable by others.
bool ownerExecute (void) const
 Tests whether the object is executable by the owner.
bool groupExecute (void) const
 Tests whether the object is executable by the group.
bool othersExecute (void) const
 Tests whether the object is executable by others.

Static Public Member Functions

static bool isFile (const NString &path)
 Tests whether the object is readable by the owner.
static bool isDir (const NString &path)
 Tests whether the object is a directory.
static bool isDevice (const NString &path)
 Tests whether the object is a device.
static bool isFifo (const NString &path)
 Tests whether the object is a fifo.
static bool isLink (const NString &path)
 Tests whether the object is a link.
static bool exists (const NString &path)
 Tests whether the object exists.
static bool ownerRead (const NString &path)
 Tests whether the object is readable by the owner.
static bool groupRead (const NString &path)
 Tests whether the object is readable by the group.
static bool othersRead (const NString &path)
 Tests whether the object is readable by others.
static bool ownerWrite (const NString &path)
 Tests whether the object is writable by the owner.
static bool groupWrite (const NString &path)
 Tests whether the object is writable by the group.
static bool othersWrite (const NString &path)
 Tests whether the object is writable by others.
static bool ownerExecute (const NString &path)
 Tests whether the object is executable by the owner.
static bool groupExecute (const NString &path)
 Tests whether the object is executable by the group.
static bool othersExecute (const NString &path)
 Tests whether the object is executable by others.


Detailed Description

NFileInfo is utility class for obtaining file information.
Examples:

ex_nfileinfo.cpp.

Definition at line 46 of file nfileinfo.h.


Member Function Documentation

bool isFile ( void   )  const

Tests whether the object is a file.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 40 of file nfileinfo.cpp.

bool isDir ( void   )  const

Tests whether the object is a directory.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 45 of file nfileinfo.cpp.

bool isDevice ( void   )  const

Tests whether the object is a device.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 50 of file nfileinfo.cpp.

bool isFifo ( void   )  const

Tests whether the object is a fifo.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 55 of file nfileinfo.cpp.

bool isLink ( void   )  const

Tests whether the object is a link.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 60 of file nfileinfo.cpp.

bool exists ( void   )  const

Tests whether the object exists.

Returns:
true in case of success or false otherwise

Definition at line 64 of file nfileinfo.cpp.

bool ownerRead ( void   )  const

Tests whether the object is readable by the owner.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 68 of file nfileinfo.cpp.

bool groupRead ( void   )  const

Tests whether the object is readable by the group.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 73 of file nfileinfo.cpp.

bool othersRead ( void   )  const

Tests whether the object is readable by others.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 78 of file nfileinfo.cpp.

bool ownerWrite ( void   )  const

Tests whether the object is writable by the owner.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 83 of file nfileinfo.cpp.

bool groupWrite ( void   )  const

Tests whether the object is writable by the group.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 88 of file nfileinfo.cpp.

bool othersWrite ( void   )  const

Tests whether the object is writable by others.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 93 of file nfileinfo.cpp.

bool ownerExecute ( void   )  const

Tests whether the object is executable by the owner.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 98 of file nfileinfo.cpp.

bool groupExecute ( void   )  const

Tests whether the object is executable by the group.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 103 of file nfileinfo.cpp.

bool othersExecute ( void   )  const

Tests whether the object is executable by others.

Returns:
true in case of success or false otherwise
Examples:
ex_nfileinfo.cpp.

Definition at line 108 of file nfileinfo.cpp.

bool isFile ( const NString path  )  [static]

Tests whether the object is readable by the owner.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 112 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool isDir ( const NString path  )  [static]

Tests whether the object is a directory.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 130 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool isDevice ( const NString path  )  [static]

Tests whether the object is a device.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 148 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool isFifo ( const NString path  )  [static]

Tests whether the object is a fifo.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 166 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool isLink ( const NString path  )  [static]

Tests whether the object is a link.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 184 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool exists ( const NString path  )  [static]

Tests whether the object exists.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 202 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool ownerRead ( const NString path  )  [static]

Tests whether the object is readable by the owner.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 219 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool groupRead ( const NString path  )  [static]

Tests whether the object is readable by the group.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 237 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool othersRead ( const NString path  )  [static]

Tests whether the object is readable by others.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 255 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool ownerWrite ( const NString path  )  [static]

Tests whether the object is writable by the owner.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 273 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool groupWrite ( const NString path  )  [static]

Tests whether the object is writable by the group.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 291 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool othersWrite ( const NString path  )  [static]

Tests whether the object is writable by others.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 309 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool ownerExecute ( const NString path  )  [static]

Tests whether the object is executable by the owner.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 327 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool groupExecute ( const NString path  )  [static]

Tests whether the object is executable by the group.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 345 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().

bool othersExecute ( const NString path  )  [static]

Tests whether the object is executable by others.

Parameters:
path Object (file, directory, etc) path
Returns:
true in case of success or false otherwise

Definition at line 363 of file nfileinfo.cpp.

References NException::BASEIO, NIOException::FILE, and NString::toChar().


The documentation for this class was generated from the following files:
Generated on Wed Mar 5 23:10:36 2008 for NemesisUtilitiesSystem by  doxygen 1.5.4