|
Rapicorn - Experimental UI Toolkit - Source Code
13.07.0
|
The Path namespace provides functions for file path manipulation and testing. More...
Functions | |
| String | dirname (const String &path) |
| String | basename (const String &path) |
| String | abspath (const String &path, const String &incwd) |
| bool | isabs (const String &path) |
| bool | isdirname (const String &path) |
| String | skip_root (const String &path) |
| String | join (const String &frag0, const String &frag1, const String &frag2, const String &frag3, const String &frag4, const String &frag5, const String &frag6, const String &frag7, const String &frag8, const String &frag9, const String &frag10, const String &frag11, const String &frag12, const String &frag13, const String &frag14, const String &frag15) |
| bool | check (const String &file, const String &mode) |
| bool | equals (const String &file1, const String &file2) |
| String | cwd () |
| Return the current working directoy. | |
| StringVector | searchpath_split (const String &searchpath) |
| String | searchpath_find (const String &searchpath, const String &file, const String &mode) |
| String | vpath_find (const String &file, const String &mode) |
| char * | memread (const String &filename, size_t *lengthp) |
| void | memfree (char *memread_mem) |
Variables | |
| const String | dir_separator |
| const String | searchpath_separator |
The Path namespace provides functions for file path manipulation and testing.
| String Rapicorn::Path::abspath | ( | const String & | path, |
| const String & | incwd | ||
| ) |
| path | a filename path |
| incwd | optional current working directory |
Complete path to become an absolute file path. If neccessary, incwd or the real current working directory is prepended.
| String Rapicorn::Path::basename | ( | const String & | path | ) |
| path | a filename path |
Strips all directory components from path and returns the resulting file name.
| bool Rapicorn::Path::check | ( | const String & | file, |
| const String & | mode | ||
| ) |
| file | possibly relative filename |
| mode | feature string |
Perform various checks on file and return whether all checks passed. On failure, errno is set appropriately, and FALSE is returned. Available features to be checked for are:
e - file must exist r - file must be readable w - file must be writable x - file must be executable f - file must be a regular file d - file must be a directory l - file must be a symbolic link c - file must be a character device b - file must be a block device p - file must be a named pipe s - file must be a socket. | String Rapicorn::Path::dirname | ( | const String & | path | ) |
| path | a filename path |
Return the directory part of a file name.
| bool Rapicorn::Path::equals | ( | const String & | file1, |
| const String & | file2 | ||
| ) |
| file1 | possibly relative filename |
| file2 | possibly relative filename |
Check whether file1 and file2 are pointing to the same inode in the same file system on the same device.
| bool Rapicorn::Path::isabs | ( | const String & | path | ) |
| path | a filename path |
Return wether path is an absolute pathname.
| bool Rapicorn::Path::isdirname | ( | const String & | path | ) |
| path | a filename path |
Return wether path is pointing to a directory component.
1.7.6.1