|
std::ostream & | paludis::operator<< (std::ostream &s, const FSPath &f) |
|
bool | operator== (const FSPath &, const FSPath &) |
|
const std::string paludis::FSPath::basename |
( |
| ) |
const |
Return the last part of our path (eg '/foo/bar' => 'bar').
void paludis::FSPath::chmod |
( |
const mode_t |
mode | ) |
const |
Change our permissions.
- Exceptions
-
void paludis::FSPath::chown |
( |
const uid_t |
owner, |
|
|
const gid_t |
group |
|
) |
| const |
Change our ownership, following symlinks.
- Exceptions
-
static FSPath paludis::FSPath::cwd |
( |
| ) |
|
|
static |
Return the current working directory
FSPath paludis::FSPath::dirname |
( |
| ) |
const |
Return the first part of our path (eg '/foo/bar' => '/foo').
void paludis::FSPath::lchown |
( |
const uid_t |
owner, |
|
|
const gid_t |
group |
|
) |
| const |
Change our ownership, not following symlinks.
- Exceptions
-
Try to make a directory.
- Returns
- True, if we succeeded, and false if the directory already exists and is a directory and options includes fspmkdo_ok_if_exists.
- Exceptions
-
FSError | If an error other than the directory already existing occurs, or if the directory already exists and options does not include fspmkdo_ok_if_exists. |
std::string paludis::FSPath::readlink |
( |
| ) |
const |
Return our destination, if we are a symlink.
- Exceptions
-
FSError | if we are not a symlink, or if the system call fails. |
FSPath paludis::FSPath::realpath |
( |
| ) |
const |
Return the canonicalised version of our path.
FSPath paludis::FSPath::realpath_if_exists |
( |
| ) |
const |
Return the canonicalised version of our path, if it exists, or ourself if it doesn't.
void paludis::FSPath::rename |
( |
const FSPath & |
new_name | ) |
const |
Rename ourself (will not work across mount points).
- Exceptions
-
bool paludis::FSPath::rmdir |
( |
| ) |
const |
Try to rmdir.
- Returns
- True, if we succeeded, and false if we don't exist already.
- Exceptions
-
FSError | If an error other than us already not existing occurs. |
bool paludis::FSPath::starts_with |
( |
const FSPath & |
| ) |
const |
Do we start with a given path (eg '/foo/bar' starts with '/foo' but not '/fo')?
FSPath paludis::FSPath::strip_leading |
( |
const FSPath & |
prefix | ) |
const |
Return the path without a given prefix (eg '/foo/bar/baz'->strip_leading('/foo') => '/bar/baz').
bool paludis::FSPath::symlink |
( |
const std::string & |
target | ) |
const |
Try to make a symlink.
- Returns
- True, if we succeeded, and false if the target already exists and is a symlink to the same target.
- Exceptions
-
FSError | If an error other than the symlink already existing occurs, or if the symlink exists and points elsewhere. |
bool paludis::FSPath::unlink |
( |
| ) |
const |
Try to unlink.
- Returns
- True, if we succeeded, and false if we don't exist already.
- Exceptions
-
FSError | If an error other than us already not existing occurs. |
bool paludis::FSPath::utime |
( |
const Timestamp & |
| ) |
const |
Try to set atime and mtime
- Returns
- True, if we succeeded, and false if we don't exist already.
- Exceptions
-
FSError | If an error other than us already not existing ocurrs. |
The documentation for this class was generated from the following file:
- /mnt/home/bo/scm/paludis/paludis/paludis/util/fs_path.hh