rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Types | Public Member Functions | Static Public Member Functions
IlPathName Class Reference

Class that manages path names in a portable way. More...

#include <ilog/pathname.h>

Public Types

enum  IlPathType { IlSystemPathType, IlUnixPathType, IlDosPathType }
 
enum  SortMode {
  SortNone, SortAlphabetically, SortCaseInsensitive, SortReverse,
  GroupDirectories, GroupExtensions
}
 

Public Member Functions

 IlPathName ()
 Constructor that initializes an empty IlPathname object. More...
 
 IlPathName (const IlString &string)
 Constructor that initializes an IlPathname object from an IlString. More...
 
 IlPathName (const char *cstring)
 Constructor that initializes an IlPathname object from a C-style string. More...
 
 IlPathName (const IlPathName &path)
 Copy constructor. More...
 
 ~IlPathName ()
 Destructor. More...
 
void addDirectory (const IlString &string, int end=-1, IlPathType type=IlSystemPathType, int start=0)
 Appends the string string to the directory part of this. More...
 
void addDosDirectory (const IlString &string, int end=-1, int start=0)
 Appends the string string, in a DOS format, to the directory part of this. More...
 
void addUnixDirectory (const IlString &string, int end=-1, int start=0)
 Appends the string string, in UNIX format, to the directory part of this. More...
 
IlBoolean changeCurrentDirectory () const
 Changes the current directory of the program. More...
 
IlBoolean changeMode (short newMode) const
 Modifies the mode of the current path name according to the value of newMode. More...
 
IlBoolean closeDir () const
 Closes the mode that lets to read the directory entries. More...
 
IlPathNamecomputeAllButFirstSubDirectory ()
 Stores into this its directory part except its first subdirectory. More...
 
IlPathNamecomputeAllButLastSubDirectory ()
 Stores into this its directory part except its last subdirectory. More...
 
IlPathNamecomputeDifferLeading (const IlPathName &path)
 Computes the subpath equal to the path without the common subpath (from the beginning of the paths) of this and path and stores it into this. More...
 
IlPathNamecomputeDifferTrailing (const IlPathName &path)
 Computes the subpath equal to the path without the common subpath (from the end of the paths) of this and path and stores it into this. More...
 
IlPathNamecomputeFirstSubDirectory ()
 Stores into this its first subdirectory. More...
 
IlPathNamecomputeLastSubDirectory ()
 Stores into this its last subdirectory. More...
 
int computeLevelNumber () const
 Returns the number of levels of the current path (number of subdirectories). More...
 
IlPathNamecomputeRelativePath (const IlPathName &path)
 Computes the relative path of this from path and stores it into this. More...
 
IlPathNamecomputeSameLeading (const IlPathName &path)
 Computes the common subpath (from the beginning of the paths) of this and path and stores it into this. More...
 
IlPathNamecomputeSameTrailing (const IlPathName &path)
 Computes the common subpath (from the end of the paths) of this and path and stores it into this. More...
 
char * copy83DosValue () const
 Returns a C-style string that contains the path name, truncated to 8.3 names, in a DOS syntax. More...
 
char * copyBaseName () const
 Returns a C-style string that contains the catenation of the file name and of the extension parts of the path name. More...
 
char * copyDevice () const
 Returns a C-style string that contains the device part of the path name. More...
 
char * copyDirectory (IlBoolean finalSep=IlTrue, IlPathType type=IlSystemPathType) const
 Returns a C-style string that contains the directory part of the path name. More...
 
char * copyDirName (IlBoolean finalSep=IlTrue, IlPathType type=IlSystemPathType) const
 Returns a C-style string that contains the concatenation of the device and of the directory parts of the path name. More...
 
char * copyDosDirectory (IlBoolean finalSep=IlTrue) const
 Returns a C-style string that contains the directory part of the path name, in a DOS syntax. More...
 
char * copyDosValue () const
 Returns a C-style string that contains the whole path name in a DOS syntax. More...
 
char * copyExtension () const
 Returns a C-style string that contains the extension part of the path name. More...
 
char * copyFileName () const
 Returns a C-style string that contains the file name part of the path name. More...
 
char * copyUnixDirectory (IlBoolean finalSep=IlTrue) const
 Returns a C-style string that contains the directory part of the path name, in a Unix syntax. More...
 
char * copyUnixValue () const
 Returns a C-style string that contains the whole path name in a UNIX syntax. More...
 
char * copyValue (IlPathType type=IlSystemPathType) const
 Returns a C-style string that contains the whole path name. More...
 
IlBoolean create (short mode=-1, IlBoolean recursive=IlTrue) const
 Creates physically a file or a directory corresponding to the path name. More...
 
IlBoolean doesExist () const
 Returns IlTrue if the path actually exits (physically), IlFalse otherwise. More...
 
void forceAbsolute ()
 Forces this to be an absolute path. More...
 
void forceDirectory ()
 Forces this to be a directory, that is, the file name and extension become part of the directory part. More...
 
void forceRelative ()
 Forces this to be a relative path. More...
 
IlString get83DosValue () const
 Returns a string that contains the path name, truncated to 8.3 names, in the DOS syntax. More...
 
IlString getBaseName () const
 Returns an IlString object that contains the concatenation of the file name and of the extension parts of the path name. More...
 
IlString getDevice () const
 Returns an IlString object that contains the device part of the IlPathname. More...
 
IlString getDirectory (IlBoolean finalSep=IlTrue, IlPathType type=IlSystemPathType) const
 Returns an IlString object that contains the directory part of the IlPathname object. More...
 
IlString getDirName (IlBoolean finalSep=IlTrue, IlPathType type=IlSystemPathType) const
 Returns an IlString object that contains the concatenation of the device and of the directory parts of the path name. More...
 
IlString getDosDirectory (IlBoolean finalSep=IlTrue) const
 Returns an IlString object that contains the directory part of the path name in a DOS syntax. More...
 
IlString getDosValue () const
 Returns a string that contains the whole path name in the DOS syntax. More...
 
IlString getExtension () const
 Returns an IlString object that contains the extension part of the path name. More...
 
IlString getFileName () const
 Returns an IlString object that contains the file name part of the path name. More...
 
IlString getString (IlPathType type=IlSystemPathType) const
 Returns an IlString object that contains the whole path name. More...
 
IlString getSubDirectory (IlInt level, IlInt count=1) const
 Returns a part of the subdirectories of the path. More...
 
IlString getTruncatedValue (int level=2) const
 Returns the path limited to the last subdirectories. More...
 
IlString getUnixDirectory (IlBoolean finalSep=IlTrue) const
 Returns an IlString object that contains the directory part of the path name in a Unix syntax. More...
 
IlString getUnixValue () const
 Returns a string that contains the whole path name in the Unix syntax. More...
 
IlBoolean isAbsolute () const
 Returns IlTrue for an absolute path, IlFalse otherwise. More...
 
IlBoolean isCurrentDirectory () const
 Returns IlTrue if the path name is a directory and the directory part is ., IlFalse otherwise. More...
 
IlBoolean isDirectory () const
 Returns IlTrue if it is a pure directory, that is, there is no file name or extension, IlFalse otherwise. More...
 
IlBoolean isEmpty () const
 Returns whether the path name is empty or not. More...
 
IlBoolean isEmptyDirectory () const
 Returns IlTrue if the path has a null directory part, IlFalse otherwise. More...
 
IlBoolean isExecutable () const
 Returns IlTrue if the path is executable, IlFalse otherwise. More...
 
IlBoolean isInCurrentDirectory () const
 Returns IlTrue if the directory part is ., IlFalse otherwise. More...
 
IlBoolean isNewer (const IlPathName &path) const
 Returns IlFalse if the current path is newer than, i.e. was modified after, the path path, IlTrue otherwise. More...
 
IlBoolean isReadable () const
 Returns IlTrue if the path is readable, IlFalse otherwise. More...
 
IlBoolean isSensitive () const
 Returns IlTrue if the file system where is stored the path is case sensitive, IlFalse otherwise. More...
 
IlBoolean isSubDirectory (const IlPathName &path) const
 Returns IlTrue if this is a subdirectory of path, IlFalse otherwise. More...
 
IlBoolean isSystemDirectory () const
 Returns IlTrue if the path is an actual directory (physically), IlFalse otherwise. More...
 
IlBoolean isWritable () const
 Returns IlTrue if the path is writable, IlFalse otherwise. More...
 
void localize ()
 Modifies the this according to the current locale. More...
 
IlBoolean match (const IlPathName &filter) const
 Returns IlTrue if the current path this matches the parameter path, IlFalse otherwise. More...
 
IlPathNamemerge (const IlPathName &path)
 Merges the value of the object path to this. More...
 
IlPathNamemerge (const IlString &string)
 Merges the value of the IlString string to this. More...
 
IlPathNamemerge (const char *cstring)
 Merges the value of the C-style string cstring to this. More...
 
IlBoolean openDir () const
 Opens a directory in a mode that lets you to get the entries of this directory. More...
 
 operator const char * () const
 This cast operator casts the object this into a C-style const string. More...
 
 operator IlString () const
 This cast operator casts the object this into a IlString object. More...
 
IlBoolean operator! () const
 The not operator. More...
 
IlBoolean operator!= (const IlPathName &path) const
 The inequality operator. More...
 
IlPathName operator+ (const IlPathName &path) const
 Catenation operator. More...
 
IlPathName operator+ (const IlString &string) const
 Catenation operator. More...
 
IlPathName operator+ (const char *cstring) const
 Catenation operator. More...
 
IlPathNameoperator+= (const IlPathName &path)
 Merge operator. More...
 
IlPathNameoperator+= (const IlString &string)
 Merge operator. More...
 
IlPathNameoperator+= (const char *cstring)
 Merge operator. More...
 
IlPathNameoperator= (const IlPathName &path)
 Assignment operator from another IlPathname object. More...
 
IlPathNameoperator= (const IlString &string)
 Assignment operator from an IlString object. More...
 
IlPathNameoperator= (const char *cstring)
 Assignment operator from a C-Style string. More...
 
IlBoolean operator== (const IlPathName &path) const
 The equality operator. More...
 
IlPathNameprepend (const IlPathName &path)
 Stores into this the result of path.merge(*this) without modifying path. More...
 
IlPathNameprepend (const IlString &string)
 Equivalent to the function IlPathName::prepend(const IlPathName&) but instead of an IlPathName, it uses a string that corresponds to the path name. More...
 
IlPathNameprepend (const char *cstring)
 Equivalent to the function IlPathName::prepend(const IlPathName&) but instead of an IlPathName, it uses a C-style string that corresponds to the path name. More...
 
IlBoolean queryAccessTime (time_t &time) const
 Fills the parametertime with the time when the path name was last accessed. More...
 
IlBoolean queryChangedStatusTime (time_t &time) const
 Fills the unsigned long time with the time when the path name was last changed on Unix, or was created on Windows/MSDOS. More...
 
void queryCurrentDirectory (IlString *drive=0)
 Stores into this the value of the current directory. More...
 
IlBoolean queryMode (short &mode) const
 Fills the short int mode with the mode of the path name. More...
 
IlBoolean queryModificationTime (time_t &time) const
 Fills the unsigned long time with the time when the path name was last modified. More...
 
IlBoolean readDir (IlPathName &result) const
 Reads the next entry of the directory pointed to by this. More...
 
IlBoolean remove (IlBoolean recursive=IlFalse) const
 Removes physically the file or directory corresponding to the path name. More...
 
void rewindDir () const
 Resets the pointer inside the directory entries. More...
 
void setBaseName (const IlString &string, int end=-1, int start=0)
 Sets the string string as the basename (file name + extension) part of this. More...
 
void setDevice (const IlString &string, int end=-1, int start=0)
 Sets the string string as the device part of this. More...
 
void setDirectory (const IlString &string, int end=-1, IlPathType type=IlSystemPathType, int start=0)
 Sets the string string as the directory part of this. More...
 
void setDirName (const IlString &string, int end=-1, IlPathType type=IlSystemPathType, int start=0)
 Sets the string string as the dirname (directory+device) part of this. More...
 
void setDosDirectory (const IlString &string, int end=-1, int start=0)
 Sets the string string, in DOS format, as the directory part of this. More...
 
void setDosDirName (const IlString &string, int end=-1, int start=0)
 Sets the string string, in DOS format, as the dirname (device + directory) part of this. More...
 
void setDosValue (const IlString &string, int end=-1, int start=0)
 Sets the string string as the value of this. More...
 
void setExtension (const IlString &string, int end=-1, int start=0)
 Sets the string string as the extension part of this. More...
 
void setFileName (const IlString &string, int end=-1, int start=0)
 Sets the string string as the file name part of this. More...
 
void setUnixDirectory (const IlString &string, int end=-1, int start=0)
 Sets the string string, in Unix format, as the directory part of this. More...
 
void setUnixDirName (const IlString &string, int end=-1, int start=0)
 Sets the string string, in Unix format, as the dirname (device + directory) part of this. More...
 
void setUnixValue (const IlString &string, int end=-1, int start=0)
 Sets the string string as the value of this. More...
 
void setValue (const IlString &string, int end=-1, IlPathType type=IlSystemPathType, int start=0)
 Sets the string string as the value of this. More...
 

Static Public Member Functions

static IlBoolean doesExist (const IlString &pathname)
 This static member function returns IlTrue if the string is a path which exists physically, IlFalse otherwise. More...
 
static IlBoolean isExecutable (const IlString &pathname)
 This static member function returns IlTrue if the string is a path which is executable, IlFalse otherwise. More...
 
static IlBoolean isReadable (const IlString &pathname)
 This static member function returns IlTrue if the string is a path which is readable, IlFalse otherwise. More...
 
static IlBoolean isWritable (const IlString &pathname)
 This static member function returns IlTrue if the string is a path which is writable, IlFalse otherwise. More...
 
static IlString Localize (const IlString pathname)
 This static member function returns an IlString built according to the current locale from the parameter pathname. More...
 
static void QueryCurrentDirectory (char result[], int maxLen, IlString *drive=0)
 This static member function stores into the C-style array result the value of the current directory. More...
 

Detailed Description

Class that manages path names in a portable way.

Library: ilog

See Also
IlString

Member Enumeration Documentation

This type indicates the syntax with which a path name will be translated into a string. In particular, it decides whether the directory separator character should be a slash, as on Unix, or a backslash, as on DOS.

Enumerator
IlSystemPathType 

The syntax of the actual system.
The directory separator character that is used is the one of the system you are running on.

IlUnixPathType 

The syntax of the UNIX-like systems.
The directory separator character is a slash ('/').

IlDosPathType 

The syntax of the DOS-like systems.
The directory separator character is a backslash ('\').

Enumerator
SortNone 

No sort on the path name is done.

SortAlphabetically 

Path names are sorted alphabetically.

SortCaseInsensitive 

Path names are sorted alphabetically, but in a case-insentitive manner.

SortReverse 

Path names are sorted in a reverse order.

GroupDirectories 

Paths identifying directories are grouped together.

GroupExtensions 

Paths identifying files with the same extension are grouped together.

Constructor & Destructor Documentation

IlPathName::IlPathName ( )

Constructor that initializes an empty IlPathname object.

Note: All the fields are empty.

See Also
IlPathName::IlPathName(const IlString&), IlPathName::IlPathName(const char*), IlPathName::IlPathName(const IlPathName&), IlPathName::~IlPathName(), IlPathName::setValue(const IlString&, int = -1, IlPathType = IlSystemPathType, int = 0),
IlPathName::IlPathName ( const IlString string)

Constructor that initializes an IlPathname object from an IlString.

The string must be in the syntax of the system.

Parameters
stringAn IlString.
See Also
IlPathName::IlPathName(), IlPathName::IlPathName(const char*), IlPathName::IlPathName(const IlPathName&), IlPathName::~IlPathName(), IlPathName::setValue(const IlString&, int = -1, IlPathType = IlSystemPathType, int = 0).
IlPathName::IlPathName ( const char *  cstring)

Constructor that initializes an IlPathname object from a C-style string.

The string must be in the syntax of the system.

Parameters
cstringA C-style string.
See Also
IlPathName::IlPathName(), IlPathName::IlPathName(const IlString&), IlPathName::IlPathName(const IlPathName&), IlPathName::~IlPathName(), IlPathName::setValue(const IlString&, int = -1, IlPathType = IlSystemPathType, int = 0).
IlPathName::IlPathName ( const IlPathName path)

Copy constructor.

It builds a new IlPathname object from the object path.

Parameters
stringA const pointer to a C-style string.
See Also
IlPathName::IlPathName(), IlPathName::IlPathName(const IlString&), IlPathName::IlPathName(const char*), IlPathName::~IlPathName(), IlPathName::setValue(const IlString&, int = -1, IlPathType = IlSystemPathType, int = 0).
IlPathName::~IlPathName ( )

Member Function Documentation

void IlPathName::addDirectory ( const IlString string,
int  end = -1,
IlPathType  type = IlSystemPathType,
int  start = 0 
)

Appends the string string to the directory part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.
You may also specify in which syntax (Dos or Unix) is the string string. By Default the value is IlvSystemPathType that is the syntax of the system.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
startAn int. The default value is 0.
See Also
IlPathName::getDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::setFileName(IlString&, int = -1, int = 0) const
IlPathName::setExtension(IlString&, int = -1, int = 0) const
IlPathName::setBaseName(IlString&, int = -1, int = 0) const
IlPathName::setDevice(IlString&, int = -1, int = 0) const
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
void IlPathName::addDosDirectory ( const IlString string,
int  end = -1,
int  start = 0 
)

Appends the string string, in a DOS format, to the directory part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.

Note: This member function also interprets the UNIX format.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::addDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDosDirectory(IlString&, int = -1, int = 0) const
IlPathName::addUnixDirectory(IlString&, int = -1, int = 0) const
void IlPathName::addUnixDirectory ( const IlString string,
int  end = -1,
int  start = 0 
)

Appends the string string, in UNIX format, to the directory part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.

Note: This member function does not interpret the DOS format.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::addDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setUnixDirectory(IlString&, int = -1, int = 0) const
IlPathName::addDosDirectory(IlString&, int = -1, int = 0) const
IlBoolean IlPathName::changeCurrentDirectory ( ) const

Changes the current directory of the program.

If an error occurs, it returns IlFalse, IlTrue otherwise.

Returns
An IlBoolean.
See Also
IlPathName::QueryCurrentDirectory(char[], int, IlString* = 0)
IlPathName::queryCurrentDirectory()
IlPathName::isSystemDirectory() const
IlBoolean IlPathName::changeMode ( short  newMode) const

Modifies the mode of the current path name according to the value of newMode.

The value depends on the system. If an error occurs, then the functions returns IlFalse, IlTrue otherwise.

Parameters
newModeA short.
Returns
An IlBoolean.
See Also
IlPathName::create(short = -1, IlBoolean = IlTrue) const
IlPathName::queryMode(short&) const
IlBoolean IlPathName::closeDir ( ) const

Closes the mode that lets to read the directory entries.

After calling this function, you won't be able to call IlPathName::readDir nor IlPathName::rewindDir. The member function IlPathName::openDir must have been called before.

If an error occurs it returns IlFalse, IlTrue otherwise.

Returns
An IlBoolean.
See Also
IlPathName::openDir() const
IlPathName::readDir(IlPathName&) const
IlPathName::rewindDir() const
IlPathName& IlPathName::computeAllButFirstSubDirectory ( )

Stores into this its directory part except its first subdirectory.

It returns a reference to this.

Returns
A reference to the current IlPathName object.
See Also
IlPathName::computeFirstSubDirectory()
IlPathName::computeLastSubDirectory()
IlPathName::computeAllButLastSubDirectory()
IlPathName& IlPathName::computeAllButLastSubDirectory ( )

Stores into this its directory part except its last subdirectory.

It returns a reference to this.

Returns
A reference to the current IlPathName object.
See Also
IlPathName::computeFirstSubDirectory()
IlPathName::computeLastSubDirectory()
IlPathName::computeAllButFirstSubDirectory()
IlPathName& IlPathName::computeDifferLeading ( const IlPathName path)

Computes the subpath equal to the path without the common subpath (from the beginning of the paths) of this and path and stores it into this.

Parameters
pathA const reference to an IlPathName object.
Returns
A reference to the current IlPathName object.
See Also
IlPathName::computeSameLeading(const IlPathName& path)
IlPathName::computeSameTrailing(const IlPathName& path)
IlPathName::computeDifferTrailing(const IlPathName& path)
IlPathName& IlPathName::computeDifferTrailing ( const IlPathName path)

Computes the subpath equal to the path without the common subpath (from the end of the paths) of this and path and stores it into this.

Parameters
pathA const reference to an IlPathName object.
Returns
A reference to the current IlPathName object.
See Also
IlPathName::computeSameLeading(const IlPathName& path)
IlPathName::computeSameTrailing(const IlPathName& path)
IlPathName::computeDifferLeading(const IlPathName& path)
IlPathName& IlPathName::computeFirstSubDirectory ( )

Stores into this its first subdirectory.

It returns a reference to this.

Returns
A reference to the current IlPathName object.
See Also
IlPathName::computeLastSubDirectory()
IlPathName::computeAllButFirstSubDirectory()
IlPathName::computeAllButLastSubDirectory()
IlPathName& IlPathName::computeLastSubDirectory ( )

Stores into this its last subdirectory.

It returns a reference to this.

Returns
A reference to the current IlPathName object.
See Also
IlPathName::computeFirstSubDirectory()
IlPathName::computeAllButFirstSubDirectory()
IlPathName::computeAllButLastSubDirectory()
int IlPathName::computeLevelNumber ( ) const

Returns the number of levels of the current path (number of subdirectories).

Returns
An int.
See Also
IlPathName::getTruncatedValue(int = 2) const
IlPathName& IlPathName::computeRelativePath ( const IlPathName path)

Computes the relative path of this from path and stores it into this.

It returns a reference to this.

Parameters
pathA const reference to an IlPathName.
Returns
A reference to the current IlPathName object.
IlPathName& IlPathName::computeSameLeading ( const IlPathName path)

Computes the common subpath (from the beginning of the paths) of this and path and stores it into this.

Parameters
pathA const reference to an IlPathName object.
Returns
A reference to the current IlPathName object.
See Also
IlPathName::computeSameTrailing(const IlPathName& path)
IlPathName::computeDifferLeading(const IlPathName& path)
IlPathName::computeDifferTrailing(const IlPathName& path)
IlPathName& IlPathName::computeSameTrailing ( const IlPathName path)

Computes the common subpath (from the end of the paths) of this and path and stores it into this.

Parameters
pathA const reference to an IlPathName object.
Returns
A reference to the current IlPathName object.
See Also
IlPathName::computeSameLeading(const IlPathName& path)
IlPathName::computeDifferLeading(const IlPathName& path)
IlPathName::computeDifferTrailing(const IlPathName& path)
char * IlPathName::copy83DosValue ( ) const

Returns a C-style string that contains the path name, truncated to 8.3 names, in a DOS syntax.

Every item of the path name (the basename, each subdirectory) is truncated to 8.3.
If the path name is empty, it returns .\.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Note: The truncation is actually the result of removing the last letters after the eight first ones (if any) of the file name part and the last letters after the three ones (if any) of the extension part (and similarly for the directory part). There is no algorithm to compute a short name as it exists in the Windows API.

Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::copyDosValue() const
IlPathName::get83DosValue() const
char * IlPathName::copyBaseName ( ) const

Returns a C-style string that contains the catenation of the file name and of the extension parts of the path name.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::getBaseName() const
IlPathName::copyFileName() const
IlPathName::copyBaseName() const
IlPathName::copyDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
char * IlPathName::copyDevice ( ) const

Returns a C-style string that contains the device part of the path name.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::getDevice() const
IlPathName::copyDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
char * IlPathName::copyDirectory ( IlBoolean  finalSep = IlTrue,
IlPathType  type = IlSystemPathType 
) const

Returns a C-style string that contains the directory part of the path name.

If the value of finalsep is IlTrue, the default, the string ends with a / or a \ according to the type parameter.
You may also specify with which syntax (Dos or Unix) you want to print the directory. By Default the value is IlvSystemPathType that is the syntax of the system.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Parameters
finalSepAn IlBoolean. The default value is IlTrue.
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::getDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyDevice() const
IlPathName::copyDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
char * IlPathName::copyDirName ( IlBoolean  finalSep = IlTrue,
IlPathType  type = IlSystemPathType 
) const

Returns a C-style string that contains the concatenation of the device and of the directory parts of the path name.

If the value of finalsep is IlTrue, the default, the string ends with a / or a \ according to the type parameter.
You may also specify with which syntax (Dos or Unix) you want to print the directory. By Default the value is IlvSystemPathType that is the syntax of the system.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Parameters
finalSepAn IlBoolean. The default value is IlTrue.
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::getDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyDevice() const
IlPathName::copyDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
char * IlPathName::copyDosDirectory ( IlBoolean  finalSep = IlTrue) const

Returns a C-style string that contains the directory part of the path name, in a DOS syntax.

If the value of finalSep is IlTrue, the default, the string ends with a \.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Parameters
finalSepAn IlBoolean. The default value is IlTrue.
Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::copyDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyUnixDirectory(IlBoolean = IlTrue) const
IlPathName::getDosDirectory(IlBoolean = IlTrue) const
char * IlPathName::copyDosValue ( ) const

Returns a C-style string that contains the whole path name in a DOS syntax.

If the path name is empty, it returns ./.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::copyValue(IlPathType = IlSystemPathType) const
IlPathName::copyUnixValue() const
IlPathName::copy83DosValue() const
IlPathName::getDosValue() const
char * IlPathName::copyExtension ( ) const

Returns a C-style string that contains the extension part of the path name.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::getExtension() const
IlPathName::copyFileName() const
IlPathName::copyBaseName() const
char * IlPathName::copyFileName ( ) const

Returns a C-style string that contains the file name part of the path name.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::getFileName() const
IlPathName::copyExtension() const
IlPathName::copyBaseName() const
char * IlPathName::copyUnixDirectory ( IlBoolean  finalSep = IlTrue) const

Returns a C-style string that contains the directory part of the path name, in a Unix syntax.

If the value of finalSep is IlTrue, the default, the string ends with a /.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Parameters
finalSepAn IlBoolean. The default value is IlTrue.
Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::copyDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyDosDirectory(IlBoolean = IlTrue) const
IlPathName::getUnixDirectory(IlBoolean = IlTrue) const
char * IlPathName::copyUnixValue ( ) const

Returns a C-style string that contains the whole path name in a UNIX syntax.

If the path name is empty, it returns ./.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::copyValue(IlPathType = IlSystemPathType) const
IlPathName::copyDosValue() const
IlPathName::getUnixValue() const
char * IlPathName::copyValue ( IlPathType  type = IlSystemPathType) const

Returns a C-style string that contains the whole path name.

You may specify with which syntax (Dos or Unix) you want to print the directory. By Default the value is IlvSystemPathType that is the syntax of the system.

Warning: The returned string must be deleted with the delete[] operator when it is not used any more.

Parameters
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
Returns
A pointer to C-style string allocated with the new[] operator.
See Also
IlPathName::getString(IlPathType = IlSystemPathType) const
IlPathName::copyDevice() const
IlPathName::copyDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyFileName() const
IlPathName::copyExtension() const
IlPathName::copyBaseName() const
IlBoolean IlPathName::create ( short  mode = -1,
IlBoolean  recursive = IlTrue 
) const

Creates physically a file or a directory corresponding to the path name.

The parameter mode is the mode with which the file or directory(ies) will be created. If the value is -1 then the mode used is the current mode (defined by umask for example on Unix). The parameter recursive specifies whether the directories must be created when they don't exist (value is IlTrue) or not (value is IlFalse).

If an error occurs it returns IlFalse, IlTrue otherwise.

Parameters
modeA short. The default value is -1.
recursiveAn IlBoolean. The default value is IlTrue.
Returns
An IlBoolean.
See Also
IlPathName::remove(IlBoolean = IlFalse) const
IlPathName::changeMode(short) const
IlBoolean IlPathName::doesExist ( ) const

Returns IlTrue if the path actually exits (physically), IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlPathName::doesExist(const IlString&)
IlPathName::isReadable() const
static IlBoolean IlPathName::doesExist ( const IlString pathname)
static

This static member function returns IlTrue if the string is a path which exists physically, IlFalse otherwise.

Parameters
pathnameA const reference to an IlString.
Returns
An IlBoolean.
See Also
IlPathName::doesExist()
IlPathName::isReadable(const IlString&)
IlPathName::isWritable(const IlString&)
IlPathName::isExecutable(const IlString&)
void IlPathName::forceAbsolute ( )

Forces this to be an absolute path.

See Also
IlPathName::forceRelative()
IlPathName::isAbsolute() const
void IlPathName::forceDirectory ( )

Forces this to be a directory, that is, the file name and extension become part of the directory part.

See Also
IlPathName::isDirectory() const
void IlPathName::forceRelative ( )

Forces this to be a relative path.

See Also
IlPathName::forceAbsolute()
IlPathName::isAbsolute() const
IlString IlPathName::get83DosValue ( ) const

Returns a string that contains the path name, truncated to 8.3 names, in the DOS syntax.

Every item of the path name (the basename, each subdirectory) is truncated to 8.3. If the path name is empty, it returns .\.

Note: The truncation is actually the result of removing the last letters after the eight first ones (if any) of the file name part and the last letters after the three ones (if any) of the extension part (and similarly for the directory part). There is no algorithm to compute a short name as it exists in the Windows API.

Returns
An IlString object.
See Also
IlPathName::getDosValue() const
IlPathName::copy83DosValue() const
IlString IlPathName::getBaseName ( ) const

Returns an IlString object that contains the concatenation of the file name and of the extension parts of the path name.

Returns
An IlString object.
See Also
IlPathName::setBaseName(const IlString&, int = -1 , int = 0)
IlPathName::getFileName() const
IlPathName::getExtension() const
IlPathName::getDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyBaseName() const
IlString IlPathName::getDevice ( ) const

Returns an IlString object that contains the device part of the IlPathname.

Returns
An IlString object.
See Also
IlPathName::setDevice(const IlString&, int = -1, int = 0)
IlPathName::getDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::getDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyDevice() const
IlString IlPathName::getDirectory ( IlBoolean  finalSep = IlTrue,
IlPathType  type = IlSystemPathType 
) const

Returns an IlString object that contains the directory part of the IlPathname object.

If the value of finalsep is IlTrue, the default, the string ends with a / or a \ according to the type parameter.
You may also specify with which syntax (Dos or Unix) you want to print the directory. By Default the value is IlvSystemPathType that is the syntax of the system.

Parameters
finalSepAn IlBoolean. The default value is IlTrue.
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
Returns
An IlString object.
See Also
IlPathName::setDirectory(const IlString&, int = -1, IlPathType = IlSystemPathType, int = 0)
IlPathName::getDevice() const
IlPathName::getDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::getDosDirectory(IlBoolean = IlTrue) const
IlPathName::getUnixDirectory(IlBoolean = IlTrue) const
IlPathName::copyDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlString IlPathName::getDirName ( IlBoolean  finalSep = IlTrue,
IlPathType  type = IlSystemPathType 
) const

Returns an IlString object that contains the concatenation of the device and of the directory parts of the path name.

If the value of finalsep is IlTrue, the default, the string ends with a / or a \ according to the type parameter.
You may also specify with which syntax (Dos or Unix) you want to print the directory. By Default the value is IlvSystemPathType that is the syntax of the system.

Parameters
finalSepAn IlBoolean. The default value is IlTrue.
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
Returns
An IlString object.
See Also
IlPathName::setDirName(const IlString&, int = -1, IlPathType = IlSystemPathType, int = 0)
IlPathName::getDevice() const
IlPathName::getBaseName() const
IlPathName::getDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlString IlPathName::getDosDirectory ( IlBoolean  finalSep = IlTrue) const

Returns an IlString object that contains the directory part of the path name in a DOS syntax.

If the value of finalsep is IlTrue, the default one, the string ends with a \.

Parameters
finalSepAn IlBoolean. The default is IlTrue.
Returns
An IlString object.
See Also
IlPathName::getDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::getUnixDirectory(IlBoolean = IlTrue) const
IlPathName::copyDosDirectory(IlBoolean = IlTrue) const
IlString IlPathName::getDosValue ( ) const

Returns a string that contains the whole path name in the DOS syntax.

If the path name is empty, it returns .\.

Returns
An IlString object.
See Also
IlPathName::getString(IlPathType = IlSystemPathType) const
IlPathName::getUnixValue() const
IlPathName::get83DosValue() const
IlPathName::copyDosValue() const
IlString IlPathName::getExtension ( ) const

Returns an IlString object that contains the extension part of the path name.

Returns
An IlString object.
See Also
IlPathName::setExtension(const IlString&, int = -1, int = 0)
IlPathName::getBaseName() const
IlPathName::copyExtension() const
IlString IlPathName::getFileName ( ) const

Returns an IlString object that contains the file name part of the path name.

Returns
An IlString object.
See Also
IlPathName::setFileName(const IlString&, int = -1, int = 0)
IlPathName::getBaseName() const
IlPathName::copyFileName() const
IlString IlPathName::getString ( IlPathType  type = IlSystemPathType) const

Returns an IlString object that contains the whole path name.

If the path name is empty, it returns ./ or .\ according to the type parameter.
You may also specify with which syntax (Dos or Unix) you want to print the directory. By Default the value is IlvSystemPathType that is the syntax of the system.

Parameters
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
Returns
An IlString object.
See Also
IlPathName::setValue(const IlString&, int = -1, IlPathType = IlSystemPathType, int = 0)
IlPathName::getFileName() const
IlPathName::getExtension() const
IlPathName::getBaseName() const
IlPathName::getDevice() const
IlPathName::getDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::getDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::copyValue(IlPathType = IlSystemPathType) const
IlString IlPathName::getSubDirectory ( IlInt  level,
IlInt  count = 1 
) const

Returns a part of the subdirectories of the path.

The string contains a part of the subdirectories of the path name in the current syntax.

Parameters
levelThe subdirectory level into the path. The level value for the first subdirectory is 1. If you want to start from the end, the level value of the last subdirectory is -1.
countThe number of subdirectories wished. For example, if you want the two first levels of subdirectories, you call this function with the values 1 and 2. If you want the four last subdirectories, you call this function with the values -4 and 4.
IlString IlPathName::getTruncatedValue ( int  level = 2) const

Returns the path limited to the last subdirectories.

The string contains the path name in the current syntax, but with only, at most, the last level subdirectories. If the path name contains more than level subdirectories, then the supplemental subdirectories are replaced by an ellipsis (...).

Parameters
levelAn int. The default value is 2.
Returns
An IlString object.
See Also
IlPathName::getString(IlPathType = IlSystemPathType) const
IlPathName::getDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlString IlPathName::getUnixDirectory ( IlBoolean  finalSep = IlTrue) const

Returns an IlString object that contains the directory part of the path name in a Unix syntax.

If the value of finalsep is IlTrue, the default one, the string ends with a /.

Parameters
finalSepAn IlBoolean. The default is IlTrue.
Returns
An IlString object.
See Also
IlPathName::getDirectory(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::getDosDirectory(IlBoolean = IlTrue) const
IlPathName::copyUnixDirectory(IlBoolean = IlTrue) const
IlString IlPathName::getUnixValue ( ) const

Returns a string that contains the whole path name in the Unix syntax.

If the path name is empty, it returns ./.

Returns
An IlString object.
See Also
IlPathName::getString(IlPathType = IlSystemPathType) const
IlPathName::getDosValue() const
IlPathName::copyUnixValue() const
IlBoolean IlPathName::isAbsolute ( ) const

Returns IlTrue for an absolute path, IlFalse otherwise.

Returns
An IlBoolean.
IlBoolean IlPathName::isCurrentDirectory ( ) const

Returns IlTrue if the path name is a directory and the directory part is ., IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlBoolean isInCurrentDirectory() const
IlBoolean IlPathName::isDirectory ( ) const

Returns IlTrue if it is a pure directory, that is, there is no file name or extension, IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlPathName::isInCurrentDirectory() const
IlPathName::isSubDirectory(const IlPathName&) const
IlBoolean IlPathName::isEmpty ( ) const

Returns whether the path name is empty or not.

It returns IlTrue if the path is empty, that is all the parts of the path are null, IlFalse otherwise.

Returns
An IlBoolean.
IlBoolean IlPathName::isEmptyDirectory ( ) const

Returns IlTrue if the path has a null directory part, IlFalse otherwise.

Returns
An IlBoolean.
IlBoolean IlPathName::isExecutable ( ) const

Returns IlTrue if the path is executable, IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlPathName::isExecutable(const IlString&)
IlPathName::doesExist() const
IlPathName::isReadable() const
IlPathName::isWritable() const
IlBoolean IlPathName::isExecutable ( const IlString pathname)
static

This static member function returns IlTrue if the string is a path which is executable, IlFalse otherwise.

Parameters
pathnameA const reference to an IlString.
Returns
An IlBoolean.
See Also
IlPathName::isExecutable()
IlPathName::doesExist(const IlString&)
IlPathName::isReadable(const IlString&)
IlPathName::isWritable(const IlString&)
IlBoolean IlPathName::isInCurrentDirectory ( ) const

Returns IlTrue if the directory part is ., IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlBoolean isCurrentDirectory() const
IlPathName::isSubDirectory(const IlPathName&) const
IlPathName::isAbsolute() const
IlBoolean IlPathName::isNewer ( const IlPathName path) const

Returns IlFalse if the current path is newer than, i.e. was modified after, the path path, IlTrue otherwise.

If an error occurs it returns IlFalse, IlTrue otherwise.

Parameters
pathA const reference to an IlPathName.
Returns
An IlBoolean.
See Also
IlPathName::queryAccessTime(unsigned long&) const
IlPathName::queryChangedStatusTime(unsigned long&) const
IlPathName::queryModificationTime(unsigned long&) const
IlBoolean IlPathName::isReadable ( ) const

Returns IlTrue if the path is readable, IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlPathName::isReadable(const IlString&)
IlPathName::doesExist() const
IlPathName::isWritable() const
IlPathName::isExecutable() const
IlBoolean IlPathName::isReadable ( const IlString pathname)
static

This static member function returns IlTrue if the string is a path which is readable, IlFalse otherwise.

Parameters
pathnameA const reference to an IlString.
Returns
An IlBoolean.
See Also
IlPathName::isReadable()
IlPathName::doesExist(const IlString&)
IlPathName::isWritable(const IlString&)
IlPathName::isExecutable(const IlString&)
IlBoolean IlPathName::isSensitive ( ) const

Returns IlTrue if the file system where is stored the path is case sensitive, IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlPathName::doesExist() const
IlBoolean IlPathName::isSubDirectory ( const IlPathName path) const

Returns IlTrue if this is a subdirectory of path, IlFalse otherwise.

Parameters
pathA const reference to an IlPathName.
Returns
An IlBoolean.
See Also
IlPathName::isInCurrentDirectory() const
IlPathName::isAbsolute() const
IlPathName::forceRelative() const
IlPathName::forceAbsolute() const
IlBoolean IlPathName::isSystemDirectory ( ) const

Returns IlTrue if the path is an actual directory (physically), IlFalse otherwise.

Returns
An IlBoolean.
IlBoolean IlPathName::isWritable ( ) const

Returns IlTrue if the path is writable, IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlPathName::isWritable(const IlString&)
IlPathName::doesExist() const
IlPathName::isReadable() const
IlPathName::isExecutable() const
IlBoolean IlPathName::isWritable ( const IlString pathname)
static

This static member function returns IlTrue if the string is a path which is writable, IlFalse otherwise.

Parameters
pathnameA const reference to an IlString.
Returns
An IlBoolean.
See Also
IlPathName::isWritable()
IlPathName::doesExist(const IlString&)
IlPathName::isReadable(const IlString&)
IlPathName::isExecutable(const IlString&)
void IlPathName::localize ( )

Modifies the this according to the current locale.

This is used to search files that depend on the localization.

See Also
IlPathName::Localize(const IlString)
static IlString IlPathName::Localize ( const IlString  pathname)
static

This static member function returns an IlString built according to the current locale from the parameter pathname.

This is used to search files that depend on the localization.

Parameters
pathnameAn IlString.
Returns
An IlString.
See Also
IlPathName::localize()
IlBoolean IlPathName::match ( const IlPathName filter) const

Returns IlTrue if the current path this matches the parameter path, IlFalse otherwise.

   This is useful only if the parameter is a filter.
   <BR><B>Note:</B> This function uses the Unix convention:


      *.* means filename = * and extension = ?*.
          *   means filename = * and extension = *.
Parameters
filterA const reference to an IlPathName.
Returns
An IlBoolean.
IlPathName& IlPathName::merge ( const IlPathName path)

Merges the value of the object path to this.

If path is an absolute path name, then it copied into this. If path is a relative path name, then the file name and extension parts of the result will contain the respective values of path, and the directory part will the concatenation of the directory parts of this and of path. The device part is not modified.

Parameters
pathA const reference to an IlPathName.
Returns
A reference to the current IlPathName object.
See Also
operator+=(const IlPathName&)
operator+=(const IlString&)
operator+=(const char*)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlString&)
IlPathName::merge(const char*)
IlPathName & IlPathName::merge ( const IlString string)

Merges the value of the IlString string to this.

If string is an absolute path name, then it copied into this. If string is a relative path name, then the file name and extension parts of the result will contain the respective values of string, and the directory part will the concatenation of the directory parts of this and of string. The device part is not modified.
The string must be in the syntax of the system.

Parameters
stringA const reference to an IlString object.
Returns
A reference to the current IlPathName object.
See Also
operator+=(const IlPathName&)
operator+=(const IlString&)
operator+=(const char*)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlPathName&)
IlPathName::merge(const char*)
IlPathName & IlPathName::merge ( const char *  cstring)

Merges the value of the C-style string cstring to this.

If cstring is an absolute path name, then it copied into this. If cstring is a relative path name, then the file name and extension parts of the result will contain the respective values of cstring, and the directory part will the concatenation of the directory parts of this and of cstring. The device part is not modified.
The string must be in the syntax of the system.

Parameters
cstringA const pointer to a C-style string.
Returns
A reference to the current IlPathName object.
See Also
operator+=(const IlPathName&)
operator+=(const IlString&)
operator+=(const char*)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlPathName&)
IlPathName::merge(const IlString&)
IlBoolean IlPathName::openDir ( ) const

Opens a directory in a mode that lets you to get the entries of this directory.

If an error occurs it returns IlFalse, IlTrue otherwise.

Returns
An IlBoolean.
See Also
IlPathName::readDir(IlPathName&) const
IlPathName::closeDir() const
IlPathName::rewindDir() const
IlPathName::operator const char * ( ) const

This cast operator casts the object this into a C-style const string.

Warning: The string must not be deleted nor modified. The lifetime of the string is the same as the one of the IlPathName object.

Returns
A const pointer to a C-style string.
See Also
operator const IlString() const
IlPathName::operator IlString ( ) const

This cast operator casts the object this into a IlString object.

Returns
A const reference to the new IlString object.
See Also
operator const char*() const
IlBoolean IlPathName::operator! ( ) const

The not operator.

The not operator returns IlTrue when the object is empty, IlFalse otherwise.

Returns
An IlBoolean.
See Also
IlPathName::isEmpty() const
IlBoolean IlPathName::operator!= ( const IlPathName path) const

The inequality operator.

The inequality operator tests whether the object this has the same value as the object path. It returns IlFalse in this case, IlTrue otherwise.

Parameters
pathA const reference to an IlPathName.
Returns
An IlBoolean.
See Also
operator==(const IlPathName&) const
IlPathName IlPathName::operator+ ( const IlPathName path) const

Catenation operator.

This operator catenates the value of the object path with the current object and returns a new IlPathname object as result.

If path is an absolute path name, then it copied into thisthe new object. If path is a relative path name, then the file name and extension parts of the result will contain the respective values of path, and the directory part will the concatenation of the directory parts of this and of path. The device part is the device part of this

Parameters
pathA const reference to an IlPathName.
Returns
An IlPathName object.
See Also
operator+=(const IlPathName&)
operator+=(const IlString&)
operator+=(const char*)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlPathName&)
IlPathName::merge(const IlString&)
IlPathName::merge(const char*)
IlPathName IlPathName::operator+ ( const IlString string) const

Catenation operator.

This operator catenates the value of the object string with the current object and returns a new IlPathname object as result.

If string is an absolute path name, then it copied into thisthe new object. If string is a relative path name, then the file name and extension parts of the result will contain the respective values of string, and the directory part will the concatenation of the directory parts of this and of string. The device part is the device part of this

Parameters
stringA const reference to an IlString object.
Returns
An IlPathName object.
See Also
operator+=(const IlPathName&)
operator+=(const IlString&)
operator+=(const char*)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlPathName&)
IlPathName::merge(const IlString&)
IlPathName::merge(const char*)
IlPathName IlPathName::operator+ ( const char *  cstring) const

Catenation operator.

This operator catenates the value of the object cstring with the current object and returns a new IlPathname object as result.

If cstring is an absolute path name, then it copied into thisthe new object. If cstring is a relative path name, then the file name and extension parts of the result will contain the respective values of cstring, and the directory part will the concatenation of the directory parts of this and of cstring. The device part is the device part of this

Parameters
cstringA const pointer to a C-style string.
Returns
An IlPathName object.
See Also
operator+=(const IlPathName&)
operator+=(const IlString&)
operator+=(const char*)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlPathName&)
IlPathName::merge(const IlString&)
IlPathName::merge(const char*)
IlPathName & IlPathName::operator+= ( const IlPathName path)

Merge operator.

This operator merges the value of the object path to this. It returns this.

If path is an absolute path name, then it copied into this. If path is a relative path name, then the file name and extension parts of the result will contain the respective values of path, and the directory part will the concatenation of the directory parts of this and of path. The device part is not modified.

Parameters
pathA const reference to an IlPathName.
Returns
A reference to the current IlPathName object.
See Also
operator+=(const IlString&)
operator+=(const char*)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlPathName&)
IlPathName::merge(const IlString&)
IlPathName::merge(const char*)
IlPathName & IlPathName::operator+= ( const IlString string)

Merge operator.

This operator merges the value of the IlString string to this. It returns this.

If string is an absolute path name, then it copied into this. If string is a relative path name, then the file name and extension parts of the result will contain the respective values of string, and the directory part will the concatenation of the directory parts of this and of string. The device part is not modified.

Warning: The string must be in the syntax of the system.

Parameters
stringA const reference to an IlString object.
Returns
A reference to the current IlPathName object.
See Also
operator+=(const IlPathName&)
operator+=(const char*)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlPathName&)
IlPathName::merge(const IlString&)
IlPathName::merge(const char*)
IlPathName & IlPathName::operator+= ( const char *  cstring)

Merge operator.

This operator merges the value of the C-style string cstring to this. It returns this.

Warning: The string must be in the syntax of the system.

If cstring is an absolute path name, then it copied into this. If cstring is a relative path name, then the file name and extension parts of the result will contain the respective values of cstring, and the directory part will the concatenation of the directory parts of this and of cstring. The device part is not modified.

Parameters
cstringA const pointer to a C-style string.
Returns
A reference to the current IlPathName object.
See Also
operator+=(const IlPathName&)
operator+=(const IlString&)
operator+(const IlPathName&) const
operator+(const IlString&) const
operator+(const char*) const
IlPathName::merge(const IlPathName&)
IlPathName::merge(const IlString&)
IlPathName::merge(const char*)
IlPathName & IlPathName::operator= ( const IlPathName path)

Assignment operator from another IlPathname object.

This assignment operator sets the value of this to the value of the object path.

Parameters
pathA const reference to an IlPathName.
Returns
A reference to the current IlPathName object.
See Also
operator=(const IlString&)
operator=(const char*)
IlPathName & IlPathName::operator= ( const IlString string)

Assignment operator from an IlString object.

This assignment operator sets the value of this to the value of the IlString string.

Warning: The string must be in the syntax of the system.

Parameters
stringA const reference to an IlString.
Returns
A reference to the current IlPathName object.
See Also
operator=(const IlPathName&)
operator=(const char*)
IlPathName & IlPathName::operator= ( const char *  cstring)

Assignment operator from a C-Style string.

This assignment operator sets the value of this to the value of the C-style string cstring.

Warning: The string must be in the syntax of the system.

Parameters
cstringA const pointer to a C-style string.
Returns
A reference to the current IlPathName object.
See Also
operator=(const IlPathName&)
operator=(const char*)
IlBoolean IlPathName::operator== ( const IlPathName path) const

The equality operator.

The equality operator tests whether the object this has the same value as the object path. It returns IlTrue in this case, IlFalse otherwise.

Parameters
pathA const reference to an IlPathName.
Returns
An IlBoolean.
See Also
operator!=(const IlPathName&) const
IlPathName& IlPathName::prepend ( const IlPathName path)

Stores into this the result of path.merge(*this) without modifying path.

For more information, see the function IlPathName::merge(const IlPathName&).

Parameters
pathA const reference to an IlPathName.
Returns
A reference to the current IlPathName object.
See Also
IlPathName::merge(const IlPathName&)
IlPathName::prepend(const IlString&)
IlPathName::prepend(const char*)
IlPathName & IlPathName::prepend ( const IlString string)

Equivalent to the function IlPathName::prepend(const IlPathName&) but instead of an IlPathName, it uses a string that corresponds to the path name.

The string must be in the syntax of the system.

Parameters
stringA const reference to an IlString.
Returns
A reference to the current IlPathName object.
See Also
IlPathName::merge(const IlString&)
IlPathName::prepend(const IlPathName&)
IlPathName::prepend(const char*)
IlPathName & IlPathName::prepend ( const char *  cstring)

Equivalent to the function IlPathName::prepend(const IlPathName&) but instead of an IlPathName, it uses a C-style string that corresponds to the path name.

The string must be in the syntax of the system.

Parameters
cstringA const pointer to a C-style string.
Returns
A reference to the current IlPathName object.
See Also
IlPathName::merge(const char*)
IlPathName::prepend(const IlPathName&)
IlPathName::prepend(const IlString&)
IlBoolean IlPathName::queryAccessTime ( time_t &  time) const

Fills the parametertime with the time when the path name was last accessed.

If an error occurs, then the functions returns IlFalse, IlTrue otherwise.

Parameters
timeA reference to a unsigned long.
Returns
An IlBoolean.
See Also
IlPathName::queryChangedStatusTime(unsigned long&) const
IlPathName::queryModificationTime(unsigned long&) const
IlBoolean IlPathName::queryChangedStatusTime ( time_t &  time) const

Fills the unsigned long time with the time when the path name was last changed on Unix, or was created on Windows/MSDOS.

If an error occurs, then the functions returns IlFalse; otherwise IlTrue.

Parameters
timeA reference to a unsigned long.
Returns
An IlBoolean.
See Also
IlPathName::queryAccessTime(unsigned long&) const
IlPathName::queryModificationTime(unsigned long&) const
void IlPathName::queryCurrentDirectory ( IlString drive = 0)

Stores into this the value of the current directory.

On system with device (such as Windows), you may get the current directory of a specific drive. If drive is null, then the current drive is used.

Parameters
driveA pointer to an IlString object.
See Also
IlPathName::QueryCurrentDirectory(char[], int, IlString* = 0)
IlPathName::changeCurrentDirectory()
static void IlPathName::QueryCurrentDirectory ( char  result[],
int  maxLen,
IlString drive = 0 
)
static

This static member function stores into the C-style array result the value of the current directory.

The maximal size is given by maxLen.
On system with device (such as MSDOS), you may get the current directory of a specific drive. If drive is null, then the current drive is used.

Parameters
resultA C-style array of characters.
maxLenAn int
driveA pointer to an IlString.
See Also
IlPathName::queryCurrentDirectory(IlString*)
IlPathName::changeCurrentDirectory()
IlBoolean IlPathName::queryMode ( short &  mode) const

Fills the short int mode with the mode of the path name.

The value depends on the system. If an error occurs, then the functions returns IlFalse; otherwise IlTrue.

Parameters
modeA reference to a short.
Returns
An IlBoolean.
See Also
IlPathName::changeMode(short)
IlBoolean IlPathName::queryModificationTime ( time_t &  time) const

Fills the unsigned long time with the time when the path name was last modified.

If an error occurs, then the functions returns IlFalse, IlTrue otherwise.

Parameters
timeA reference to a unsigned long.
Returns
An IlBoolean.
See Also
IlPathName::queryAccessTime(unsigned long&) const
IlPathName::queryChangedStatusTime(unsigned long&) const
IlBoolean IlPathName::readDir ( IlPathName result) const

Reads the next entry of the directory pointed to by this.

This entry is stored into the path result. The member function openDir must have been called before.

If an error occurs the return value is IlFalse, IlTrue otherwise.

Parameters
resultA reference to an IlPathName.
Returns
An IlBoolean.
See Also
IlPathName::openDir() const
IlPathName::closeDir() const
IlPathName::rewindDir() const
IlBoolean IlPathName::remove ( IlBoolean  recursive = IlFalse) const

Removes physically the file or directory corresponding to the path name.

If the value of the parameter recursive is IlTrue, and the path name is a directory, then all the entries of this directory are removed (recursively for the subdirectories).

If an error occurs it returns IlFalse, IlTrue otherwise.

Parameters
recursiveAn IlBoolean. The default value is IlFalse.
Returns
An IlBoolean.
See Also
IlPathName::create(short = -1, IlBoolean = IlTrue) const
void IlPathName::rewindDir ( ) const

Resets the pointer inside the directory entries.

After calling this function, the next value returned will be the first entry of the directory whatever entries were already read before. The member function IlPathName::openDir must have been called before.

See Also
IlPathName::openDir() const
IlPathName::readDir(IlPathName&) const
IlPathName::closeDir() const
void IlPathName::setBaseName ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string as the basename (file name + extension) part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::getBaseName() const
IlPathName::setFileName(IlString&, int = -1, int = 0) const
IlPathName::setExtension(IlString&, int = -1, int = 0) const
IlPathName::setDevice(IlString&, int = -1, int = 0) const
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
void IlPathName::setDevice ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string as the device part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::getDevice() const
IlPathName::setFileName(IlString&, int = -1, int = 0) const
IlPathName::setExtension(IlString&, int = -1, int = 0) const
IlPathName::setBaseName(IlString&, int = -1, int = 0) const
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
void IlPathName::setDirectory ( const IlString string,
int  end = -1,
IlPathType  type = IlSystemPathType,
int  start = 0 
)

Sets the string string as the directory part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.
You may also specify in which syntax (Dos or Unix) is the string string. By Default the value is IlvSystemPathType that is the syntax of the system.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
startAn int. The default value is 0.
See Also
IlPathName::getDirectory(IlBoolean = IlTrue, IlBoolean = IlSystemPathType) const
IlPathName::setFileName(IlString&, int = -1, int = 0) const
IlPathName::setExtension(IlString&, int = -1, int = 0) const
IlPathName::setBaseName(IlString&, int = -1, int = 0) const
IlPathName::setDevice(IlString&, int = -1, int = 0) const
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::addDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
void IlPathName::setDirName ( const IlString string,
int  end = -1,
IlPathType  type = IlSystemPathType,
int  start = 0 
)

Sets the string string as the dirname (directory+device) part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.
You may also specify in which syntax (Dos or Unix) is the string string. By Default the value is IlvSystemPathType that is the syntax of the system.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
startAn int. The default value is 0.
See Also
IlPathName::getDirName(IlBoolean = IlTrue, IlPathType = IlSystemPathType) const
IlPathName::setFileName(IlString&, int = -1, int = 0) const
IlPathName::setExtension(IlString&, int = -1, int = 0) const
IlPathName::setBaseName(IlString&, int = -1, int = 0) const
IlPathName::setDevice(IlString&, int = -1, int = 0) const
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
void IlPathName::setDosDirectory ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string, in DOS format, as the directory part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.

Note: This member function also interprets the UNIX format.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setUnixDirectory(IlString&, int = -1, int = 0) const
IlPathName::addDosDirectory(IlString&, int = -1, int = 0) const
void IlPathName::setDosDirName ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string, in DOS format, as the dirname (device + directory) part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.
Note: This member function also interprets the UNIX format.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setUnixDirName(IlString&, int = -1, int = 0) const
void IlPathName::setDosValue ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string as the value of this.

This function interprets the string in a DOS format.
The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.
Note: This member function also interprets the UNIX format.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::setValue(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDosValue(IlString&, int = -1, int = 0) const
void IlPathName::setExtension ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string as the extension part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::getExtension() const
IlPathName::setFileName(IlString&, int = -1, int = 0) const
IlPathName::setBaseName(IlString&, int = -1, int = 0) const
IlPathName::setDevice(IlString&, int = -1, int = 0) const
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
void IlPathName::setFileName ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string as the file name part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::getFileName() const
IlPathName::setExtension(IlString&, int = -1, int = 0) const
IlPathName::setBaseName(IlString&, int = -1, int = 0) const
IlPathName::setDevice(IlString&, int = -1, int = 0) const
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
void IlPathName::setUnixDirectory ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string, in Unix format, as the directory part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.

Note: This member function does not interpret the DOS format.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDosDirectory(IlString&, int = -1, int = 0) const
IlPathName::addUnixDirectory(IlString&, int = -1, int = 0) const
void IlPathName::setUnixDirName ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string, in Unix format, as the dirname (device + directory) part of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.
Note: This member function does not interpret the DOS format.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDosDirName(IlString&, int = -1, int = 0) const
void IlPathName::setUnixValue ( const IlString string,
int  end = -1,
int  start = 0 
)

Sets the string string as the value of this.

This function interprets the string in a UNIX format.
The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.
Note: This member function does not interpret the DOS format.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
startAn int. The default value is 0.
See Also
IlPathName::setValue(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDosValue(IlString&, int = -1, int = 0) const
void IlPathName::setValue ( const IlString string,
int  end = -1,
IlPathType  type = IlSystemPathType,
int  start = 0 
)

Sets the string string as the value of this.

The parameters end and start let you restrict the string to set.
If end has the value -1 then the string is used until its end; otherwise end is the position of the first character after the substring.
The parameter start defines the beginning of the substring.
You may also specify in which syntax (Dos or Unix) is the string string. By Default the value is IlvSystemPathType that is the syntax of the system.

Parameters
stringA const reference to an IlString.
endAn int. The default value is -1.
typeAn IlPathType. The default value is IlSystemPathType, that is the syntax of the system.
startAn int. The default value is 0.
See Also
IlPathName::getString(IlPathType = IlSystemPathType) const
IlPathName::setFileName(IlString&, int = -1, int = 0) const
IlPathName::setExtension(IlString&, int = -1, int = 0) const
IlPathName::setBaseName(IlString&, int = -1, int = 0) const
IlPathName::setDevice(IlString&, int = -1, int = 0) const
IlPathName::setDirName(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const
IlPathName::setDirectory(IlString&, int = -1, IlPathType = IlSystemPathType, int = 0) const

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.