#include <namespace_dir.hpp>
Public Member Functions | |
directory (session const &s, saga::url url, int mode=Read, saga::object::type t=saga::object::NSDirectory) | |
Creates the object. | |
directory (saga::url url, int mode=Read, saga::object::type t=saga::object::NSDirectory) | |
Creates the object. | |
directory (saga::object const &o) | |
Creates the object. | |
directory (void) | |
Creates the object. | |
~directory (void) | |
Destroys the object. | |
directory & | operator= (saga::object const &o) |
Brief description starts here. | |
void | change_dir (saga::url target) |
Change the working directory. | |
std::vector< saga::url > | list (std::string pattern="*", int flags=saga::name_space::None) const |
List entries in this directory. | |
std::vector< saga::url > | find (std::string pattern, int flags=saga::name_space::Recursive) const |
Find entries in the current directory and below. | |
saga::url | read_link (saga::url url) const |
Returns the name of the link target. | |
bool | exists (saga::url url) const |
Returns true if entry exists, false otherwise. | |
bool | is_dir (saga::url url) const |
Tests name for being a directory. | |
bool | is_entry (saga::url url) const |
Tests name for being a namespace_entry. | |
bool | is_link (saga::url url) const |
Tests name for beeing a symbolic link. | |
std::size_t | get_num_entries (void) const |
Gives the number of entries in the directory. | |
saga::url | get_entry (std::size_t entry) const |
Gives the name of an entry in the directory based upon the enumeration defined by get_num_entries. | |
void | copy (saga::url source_url, saga::url dest_url, int flags=saga::name_space::None) |
Copy the entry to another part of the namespace. | |
void | copy (std::string source_url, saga::url dest_url, int flags=saga::name_space::None) |
Copy the entry to another part of the namespace. | |
void | copy (char const *source_url, saga::url dest_url, int flags=saga::name_space::None) |
Copy the entry to another part of the namespace. | |
void | link (saga::url source_url, saga::url dest_url, int flags=saga::name_space::None) |
Create a symbolic link from the source entry to the target entry so that any reference to the target refers to the source entry. | |
void | link (std::string source_url, saga::url dest_url, int flags=saga::name_space::None) |
Create a symbolic link from the source entry to the target entry so that any reference to the target refers to the source entry. | |
void | link (char const *source_url, saga::url dest_url, int flags=saga::name_space::None) |
Create a symbolic link from the source entry to the target entry so that any reference to the target refers to the source entry. | |
void | move (saga::url source_url, saga::url dest_url, int flags=saga::name_space::None) |
Rename source to target, or move source to target if target is an directory. | |
void | move (std::string source_url, saga::url dest_url, int flags=saga::name_space::None) |
Rename source to target, or move source to target if target is an directory. | |
void | move (char const *source_url, saga::url dest_url, int flags=saga::name_space::None) |
Rename source to target, or move source to target if target is an directory. | |
void | remove (saga::url url, int flags=saga::name_space::None) |
Removes the entry. | |
void | remove (std::string url, int flags=saga::name_space::None) |
Removes the entry. | |
void | remove (char const *url, int flags=saga::name_space::None) |
Removes the entry. | |
void | make_dir (saga::url url, int flags=saga::name_space::None) |
Creates a new directory. | |
saga::name_space::entry | open (saga::url url, int flags=saga::name_space::None) |
Creates a new namespace_entry instance. | |
saga::name_space::directory | open_dir (saga::url url, int flags=saga::name_space::Read) |
Creates a new namespace_directory instance. | |
void | permissions_allow (saga::url target, std::string id, int perm, int flags=None) |
Enable a permission. | |
void | permissions_deny (saga::url target, std::string id, int perm, int flags=None) |
Disable a permission. | |
void | permissions_allow (std::string target, std::string id, int perm, int flags=None) |
Enable a permission. | |
void | permissions_deny (std::string target, std::string id, int perm, int flags=None) |
Disable a permission. | |
void | permissions_allow (char const *target, std::string id, int perm, int flags=None) |
Enable a permission. | |
void | permissions_deny (char const *target, std::string id, int perm, int flags=None) |
Disable a permission. | |
Static Public Member Functions | |
static directory | create (session const &s, saga::url url, int mode=Read) |
Factory function resembling entry(session, url, int) constructor. | |
static directory | create (saga::url url, int mode=Read) |
Factory function resembling entry(url, int) constructor. | |
template<typename Tag> | |
static saga::task | create (saga::url url, int mode=Read) |
Factory function resembling entry(url, int) constructor. |
Inherits all navigation and manipulation methods from ns_entry, but adds some more methods to these sets: instead of dir.copy (target) they allow, for example, to do dir.copy (source, target). Other methods added allow to change the cwd of the instance (which changes the values re- turned by the get_name(), get_cwd() and get_url() inspection methods), and others allow to open new ns_entry and ns_directory instances (open() and open_dir()).
saga::name_space::directory::directory | ( | session const & | s, | |
saga::url | url, | |||
int | mode = Read , |
|||
saga::object::type | t = saga::object::NSDirectory | |||
) |
saga::name_space::directory::directory | ( | saga::url | url, | |
int | mode = Read , |
|||
saga::object::type | t = saga::object::NSDirectory | |||
) | [explicit] |
saga::name_space::directory::directory | ( | saga::object const & | o | ) | [explicit] |
Creates the object.
Reimplemented in saga::advert::directory, saga::cpr::directory, and saga::filesystem::directory.
saga::name_space::directory::directory | ( | void | ) |
Creates the object.
Reimplemented in saga::advert::directory, saga::cpr::directory, and saga::filesystem::directory.
saga::name_space::directory::~directory | ( | void | ) |
Destroys the object.
Reimplemented in saga::advert::directory, saga::cpr::directory, and saga::filesystem::directory.
static directory saga::name_space::directory::create | ( | session const & | s, | |
saga::url | url, | |||
int | mode = Read | |||
) | [inline, static] |
Factory function resembling entry(session, url, int) constructor.
Reimplemented from saga::name_space::entry.
Reimplemented in saga::cpr::directory, saga::filesystem::directory, and saga::replica::logical_directory.
static directory saga::name_space::directory::create | ( | saga::url | url, | |
int | mode = Read | |||
) | [inline, static] |
Factory function resembling entry(url, int) constructor.
Reimplemented from saga::name_space::entry.
Reimplemented in saga::cpr::directory, saga::cpr::directory, saga::filesystem::directory, saga::filesystem::directory, saga::replica::logical_directory, and saga::replica::logical_directory.
static saga::task saga::name_space::directory::create | ( | saga::url | url, | |
int | mode = Read | |||
) | [inline, static] |
Factory function resembling entry(url, int) constructor.
Reimplemented from saga::name_space::entry.
Reimplemented in saga::cpr::directory, saga::cpr::directory, saga::filesystem::directory, saga::filesystem::directory, saga::replica::logical_directory, and saga::replica::logical_directory.
directory & saga::name_space::directory::operator= | ( | saga::object const & | o | ) |
Brief description starts here.
Reimplemented from saga::name_space::entry.
Reimplemented in saga::advert::directory, saga::cpr::directory, saga::filesystem::directory, and saga::replica::logical_directory.
References saga::name_space::entry::operator=().
Referenced by saga::replica::logical_directory::operator=(), saga::filesystem::directory::operator=(), saga::cpr::directory::operator=(), and saga::advert::directory::operator=().
void saga::name_space::directory::change_dir | ( | saga::url | target | ) | [inline] |
std::vector<saga::url> saga::name_space::directory::list | ( | std::string | pattern = "*" , |
|
int | flags = saga::name_space::None | |||
) | const [inline] |
List entries in this directory.
pattern | Name or pattern to list |
std::vector<saga::url> saga::name_space::directory::find | ( | std::string | pattern, | |
int | flags = saga::name_space::Recursive | |||
) | const [inline] |
Find entries in the current directory and below.
pattern | Pattern for names of entries to be found | |
flags | Flags defining the operation modus |
bool saga::name_space::directory::exists | ( | saga::url | url | ) | const [inline] |
bool saga::name_space::directory::is_dir | ( | saga::url | url | ) | const [inline] |
Tests name for being a directory.
url | Name to be tested |
References saga::task::get_result().
bool saga::name_space::directory::is_entry | ( | saga::url | url | ) | const [inline] |
Tests name for being a namespace_entry.
url | Name to be tested |
References saga::task::get_result().
bool saga::name_space::directory::is_link | ( | saga::url | url | ) | const [inline] |
Tests name for beeing a symbolic link.
url | Name to be tested |
References saga::task::get_result().
std::size_t saga::name_space::directory::get_num_entries | ( | void | ) | const [inline] |
Gives the number of entries in the directory.
References saga::task::get_result().
saga::url saga::name_space::directory::get_entry | ( | std::size_t | entry | ) | const [inline] |
void saga::name_space::directory::copy | ( | saga::url | source_url, | |
saga::url | dest_url, | |||
int | flags = saga::name_space::None | |||
) | [inline] |
Copy the entry to another part of the namespace.
source_url | Name to copy | |
dest_url | Name to copy to | |
flags | Flags defining the operation modus |
void saga::name_space::directory::copy | ( | std::string | source_url, | |
saga::url | dest_url, | |||
int | flags = saga::name_space::None | |||
) | [inline] |
Copy the entry to another part of the namespace.
source_url | Name to copy, can contain wild cards | |
dest_url | Name to copy to | |
flags | Flags defining the operation modus |
void saga::name_space::directory::copy | ( | char const * | source_url, | |
saga::url | dest_url, | |||
int | flags = saga::name_space::None | |||
) | [inline] |
Copy the entry to another part of the namespace.
source_url | Name to copy, can contain wild cards | |
dest_url | Name to copy to | |
flags | Flags defining the operation modus |
void saga::name_space::directory::link | ( | std::string | source_url, | |
saga::url | dest_url, | |||
int | flags = saga::name_space::None | |||
) | [inline] |
void saga::name_space::directory::link | ( | char const * | source_url, | |
saga::url | dest_url, | |||
int | flags = saga::name_space::None | |||
) | [inline] |
void saga::name_space::directory::move | ( | saga::url | source_url, | |
saga::url | dest_url, | |||
int | flags = saga::name_space::None | |||
) | [inline] |
Rename source to target, or move source to target if target is an directory.
source_url | Name to move | |
dest_url | Name to move to | |
flags | Flags defining the operation modus |
void saga::name_space::directory::move | ( | std::string | source_url, | |
saga::url | dest_url, | |||
int | flags = saga::name_space::None | |||
) | [inline] |
Rename source to target, or move source to target if target is an directory.
source_url | Name to move, can contain wild cards | |
dest_url | Name to move to | |
flags | Flags defining the operation modus |
References saga::task::get_result().
void saga::name_space::directory::move | ( | char const * | source_url, | |
saga::url | dest_url, | |||
int | flags = saga::name_space::None | |||
) | [inline] |
Rename source to target, or move source to target if target is an directory.
source_url | Name to move, can contain wild cards | |
dest_url | Name to move to | |
flags | Flags defining the operation modus |
References saga::task::get_result().
void saga::name_space::directory::remove | ( | saga::url | url, | |
int | flags = saga::name_space::None | |||
) | [inline] |
void saga::name_space::directory::remove | ( | std::string | url, | |
int | flags = saga::name_space::None | |||
) | [inline] |
void saga::name_space::directory::remove | ( | char const * | url, | |
int | flags = saga::name_space::None | |||
) | [inline] |
void saga::name_space::directory::make_dir | ( | saga::url | url, | |
int | flags = saga::name_space::None | |||
) | [inline] |
saga::name_space::entry saga::name_space::directory::open | ( | saga::url | url, | |
int | flags = saga::name_space::None | |||
) | [inline] |
Creates a new namespace_entry instance.
url | Entry | |
flags | Flags defining the operation modus |
Reimplemented in saga::advert::directory, saga::cpr::directory, saga::filesystem::directory, and saga::replica::logical_directory.
References saga::task::get_result().
saga::name_space::directory saga::name_space::directory::open_dir | ( | saga::url | url, | |
int | flags = saga::name_space::Read | |||
) | [inline] |
Creates a new namespace_directory instance.
url | Directory to open | |
flags | Flags defining the operation |
Reimplemented in saga::advert::directory, saga::cpr::directory, saga::filesystem::directory, and saga::replica::logical_directory.
void saga::name_space::directory::permissions_allow | ( | saga::url | target, | |
std::string | id, | |||
int | perm, | |||
int | flags = None | |||
) | [inline] |
Enable a permission.
target | entry to set permissions for | |
id | id to set permission for | |
perm | permission to enable | |
flags | mode of operation |
void saga::name_space::directory::permissions_deny | ( | saga::url | target, | |
std::string | id, | |||
int | perm, | |||
int | flags = None | |||
) | [inline] |
Disable a permission.
target | entry to set permissions for | |
id | id to set permission for | |
perm | permission to disable | |
flags | mode of operation |
void saga::name_space::directory::permissions_allow | ( | std::string | target, | |
std::string | id, | |||
int | perm, | |||
int | flags = None | |||
) | [inline] |
Enable a permission.
target | entry to set permissions for, may contain wild cards | |
id | id to set permission for | |
perm | permission to enable | |
flags | mode of operation |
void saga::name_space::directory::permissions_deny | ( | std::string | target, | |
std::string | id, | |||
int | perm, | |||
int | flags = None | |||
) | [inline] |
Disable a permission.
target | entry to set permissions for, may contain wild cards | |
id | id to set permission for | |
perm | permission to disable | |
flags | mode of operation |
void saga::name_space::directory::permissions_allow | ( | char const * | target, | |
std::string | id, | |||
int | perm, | |||
int | flags = None | |||
) | [inline] |
Enable a permission.
target | entry to set permissions for, may contain wild cards | |
id | id to set permission for | |
perm | permission to enable | |
flags | mode of operation |
void saga::name_space::directory::permissions_deny | ( | char const * | target, | |
std::string | id, | |||
int | perm, | |||
int | flags = None | |||
) | [inline] |
Disable a permission.
target | entry to set permissions for, may contain wild cards | |
id | id to set permission for | |
perm | permission to disable | |
flags | mode of operation |