OW_NAMESPACE::FileSystem::Path Namespace Reference


Functions

String realPath (const String &path)
 Convert path to the canonicalized absolute pathname by expanding all symbolic links and resolving references to /.
String dirname (const String &filename)
 Take a string that contains a pathname, and return a string that is a pathname of the parent directory of that file.
String getCurrentWorkingDirectory ()
 Get the process's current working directory.


Function Documentation

String OW_NAMESPACE::FileSystem::Path::dirname const String &  filename  ) 
 

Take a string that contains a pathname, and return a string that is a pathname of the parent directory of that file.

Trailing '/' characters in the path are not counted as part of the path. If path does not contain a '/', then dirname() shall return the string ".". If path an empty string, dirname() shall return the string ".".

Parameters:
filename The file pathname
Returns:
The pathname of the parent directory of filename.

Definition at line 681 of file OW_PosixFileSystem.cpp.

References OW_NAMESPACE::String::lastIndexOf(), OW_NAMESPACE::String::length(), OW_FILENAME_SEPARATOR, OW_FILENAME_SEPARATOR_C, and OW_NAMESPACE::String::substring().

Referenced by OW_NAMESPACE::randFileIsSecure(), and OW_NAMESPACE::CryptographicRandomNumber::saveRandomState().

String OW_NAMESPACE::FileSystem::Path::getCurrentWorkingDirectory  ) 
 

Get the process's current working directory.

Calls to chdir() or fchdir() will modify this. Multi-threaded applications must exercise caution changing the current working directory.

Exceptions:
FileSystemException,: ENOENT-The current working directory has been unlinked.

Definition at line 712 of file OW_PosixFileSystem.cpp.

References MAXPATHLEN, and OW_THROW_ERRNO.

String OW_NAMESPACE::FileSystem::Path::realPath const String &  path  ) 
 

Convert path to the canonicalized absolute pathname by expanding all symbolic links and resolving references to /.

/, /../ and extra / characters. If path is relative, it will be interpreted as relative to the current working directory. This function is similar to the SuSv3 function, however it's easier to use and thread safe.

Parameters:
path The path to canonicalize.
Returns:
The canonicalized version of path.
Exceptions:
FileSystemException EACCESS, EIO, ELOOP, ENOENT, ENOTDIR

Definition at line 535 of file OW_PosixFileSystem.cpp.

References OW_NAMESPACE::String::c_str().

Referenced by OW_NAMESPACE::randFilePathIsSecure(), and OW_NAMESPACE::FileSystem::readSymbolicLink().


Generated on Thu Feb 9 09:17:13 2006 for openwbem by  doxygen 1.4.6