BLOCXX_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 BLOCXX_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 683 of file PosixFileSystem.cpp.

References BLOCXX_FILENAME_SEPARATOR, BLOCXX_FILENAME_SEPARATOR_C, BLOCXX_NAMESPACE::String::lastIndexOf(), BLOCXX_NAMESPACE::String::length(), and BLOCXX_NAMESPACE::String::substring().

String BLOCXX_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 714 of file PosixFileSystem.cpp.

References BLOCXX_THROW_ERRNO, and MAXPATHLEN.

String BLOCXX_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 537 of file PosixFileSystem.cpp.

References BLOCXX_NAMESPACE::String::c_str().

Referenced by BLOCXX_NAMESPACE::FileSystem::readSymbolicLink().


Generated on Fri Jun 16 15:39:12 2006 for blocxx by  doxygen 1.4.6