SAGA C++ API 1.5.3

saga::name_space::directory Class Reference

A "Virtual Directory", an RNS entry that is represented as a non-leaf node in the hierarchical name space tree. More...

#include <namespace_dir.hpp>

Inheritance diagram for saga::name_space::directory:

List of all members.

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.
directoryoperator= (saga::object const &o)
 Brief description starts here.
void change_dir (saga::url target)
 Change the working directory.
std::vector< saga::urllist (std::string pattern="*", int flags=saga::name_space::None) const
 List entries in this directory.
saga::name_space::None
std::vector< saga::url
find (std::string pattern, int flags=saga::name_space::Recursive) const
 Find entries in the current directory and below.
saga::name_space::Recursive
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.
saga::name_space::None void copy (std::string source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ SAGA_CALL_PUB_3_DEF_1 (copy, saga::url, saga::url, int,
saga::name_space::None void copy (char const *source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ SAGA_CALL_PUB_3_DEF_1 (copy, std::string, saga::url, int,
saga::task copy (char const *source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ template <class tag>="">
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.
saga::name_space::None void link (std::string source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ SAGA_CALL_PUB_3_DEF_1(link, saga::url, saga::url, int,
saga::name_space::None void link (char const *source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ SAGA_CALL_PUB_3_DEF_1(link, std::string, saga::url, int,
saga::task link (char const *source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ template <class tag>="">
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.
saga::name_space::None void move (std::string source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ SAGA_CALL_PUB_3_DEF_1(move, saga::url, saga::url, int,
saga::name_space::None void move (char const *source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ SAGA_CALL_PUB_3_DEF_1(move, std::string, saga::url, int,
saga::task move (char const *source_url, saga::url dest_url, int flags=saga::name_space::None)
 @ template <class tag>="">
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.
saga::task remove (char const *url, int flags=saga::name_space::None)
 @ template <class tag>="">
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::Read)
 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.
None void permissions_deny (saga::url target, std::string id, int perm, int flags=None)
 Disable a permission.
None void permissions_allow (std::string target, std::string id, int perm, int flags=None)
 Enable a permission.
None void permissions_deny (std::string target, std::string id, int perm, int flags=None)
 Disable a permission.
None void permissions_allow (char const *target, std::string id, int perm, int flags=None)
 Enable a permission.
saga::task permissions_allow (char const *target, std::string id, int perm, int flags=None)
 @ template <class tag>="">
void permissions_deny (char const *target, std::string id, int perm, int flags=None)
 Disable a permission.
saga::task permissions_deny (char const *target, std::string id, int perm, int flags=None)
 @ template <class tag>="">

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.

Public Attributes

 int
 @ SAGA_CALL_CONST_PUB_2_DEF_1(find, std::string,

Protected Types

typedef
saga::name_space::entry::monitorable_base 
monitorable_base

Protected Member Functions

TR1::shared_ptr
< saga::impl::namespace_dir > 
get_impl_sp () const
 @ /** These methods are not within API scope */
saga::impl::namespace_dir * get_impl () const
 directory (saga::impl::namespace_dir *)

Detailed Description

A "Virtual Directory", an RNS entry that is represented as a non-leaf node in the hierarchical name space tree.

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()).


Member Typedef Documentation


Constructor & Destructor Documentation

saga::name_space::directory::directory ( saga::impl::namespace_dir *  init) [protected]

@ /** These methods are not within API scope */

saga::name_space::directory::directory ( session const &  s,
saga::url  url,
int  mode = Read,
saga::object::type  t = saga::object::NSDirectory 
)

Creates the object.

References saga::object::get_impl(), and saga::object::NSDirectory.

saga::name_space::directory::directory ( saga::url  url,
int  mode = Read,
saga::object::type  t = saga::object::NSDirectory 
) [explicit]

Creates the object.

References saga::object::get_impl(), and saga::object::NSDirectory.

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.


Member Function Documentation

TR1::shared_ptr< saga::impl::namespace_dir > saga::name_space::directory::get_impl_sp ( void  ) const [protected]

@ /** These methods are not within API scope */

Reimplemented from saga::name_space::entry.

Reimplemented in saga::advert::directory, saga::cpr::directory, saga::filesystem::directory, and saga::replica::logical_directory.

saga::impl::namespace_dir * saga::name_space::directory::get_impl ( void  ) const [protected]
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]
template<typename Tag >
static saga::task saga::name_space::directory::create ( saga::url  url,
int  mode = Read 
) [inline, static]
directory & saga::name_space::directory::operator= ( saga::object const &  o)
void saga::name_space::directory::change_dir ( saga::url  target) [inline]

Change the working directory.

Parameters:
targetDirectory to change to
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.

@ SAGA_CALL_PUB_1_DEF_0(change_dir, saga::url)

Parameters:
patternName or pattern to list
Returns:
Array of names matching the pattern
saga::name_space::None 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.

Parameters:
patternPattern for names of entries to be found
flagsFlags defining the operation modus
Returns:
Array of names matching the pattern
saga::name_space::Recursive saga::url saga::name_space::directory::read_link ( saga::url  url) const [inline]

Returns the name of the link target.

Parameters:
urlName to be resolved
Returns:
Resolved name
bool saga::name_space::directory::exists ( saga::url  url) const [inline]

Returns true if entry exists, false otherwise.

@ SAGA_CALL_CONST_PUB_1_DEF_0(read_link, saga::url)

Parameters:
urlName to be tested for existence
Returns:
Boolean indicating existence of name
bool saga::name_space::directory::is_dir ( saga::url  url) const [inline]

Tests name for being a directory.

@ SAGA_CALL_CONST_PUB_1_DEF_0(exists, saga::url)

Parameters:
urlName to be tested
Returns:
boolean indicating if name is a directory
bool saga::name_space::directory::is_entry ( saga::url  url) const [inline]

Tests name for being a namespace_entry.

@ SAGA_CALL_CONST_PUB_1_DEF_0(is_dir, saga::url)

Parameters:
urlName to be tested
Returns:
Boolean indicating if name is a non-directory entry
bool saga::name_space::directory::is_link ( saga::url  url) const [inline]

Tests name for beeing a symbolic link.

@ SAGA_CALL_CONST_PUB_1_DEF_0(is_entry, saga::url)

Parameters:
urlName to be tested
Returns:
Boolean indicating if name is a link
std::size_t saga::name_space::directory::get_num_entries ( void  ) const [inline]

Gives the number of entries in the directory.

Returns:
Number of entries in the directory
saga::url saga::name_space::directory::get_entry ( std::size_t  entry) const [inline]

Gives the name of an entry in the directory based upon the enumeration defined by get_num_entries.

@ SAGA_CALL_CONST_PUB_0_DEF_0(get_num_entries)

Parameters:
entryIndex of entry to get
Returns:
Name of entry at index
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.

@ SAGA_CALL_CONST_PUB_1_DEF_0(get_entry, unsigned int)

Parameters:
source_urlName to copy
dest_urlName to copy to
flagsFlags defining the operation modus
saga::name_space::None void saga::name_space::directory::copy ( std::string  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ SAGA_CALL_PUB_3_DEF_1 (copy, saga::url, saga::url, int,

Copy the entry to another part of the namespace

Parameters:
source_urlName to copy, can contain wild cards
dest_urlName to copy to
flagsFlags defining the operation modus
saga::name_space::None void saga::name_space::directory::copy ( char const *  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ SAGA_CALL_PUB_3_DEF_1 (copy, std::string, saga::url, int,

Copy the entry to another part of the namespace

Parameters:
source_urlName to copy, can contain wild cards
dest_urlName to copy to
flagsFlags defining the operation modus
saga::task saga::name_space::directory::copy ( char const *  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ template <class tag>="">

void saga::name_space::directory::link ( saga::url  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

Create a symbolic link from the source entry to the target entry so that any reference to the target refers to the source entry.

Parameters:
source_urlName to link
dest_urlName to link to
flagsFlags defining the operation modus
saga::name_space::None void saga::name_space::directory::link ( std::string  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ SAGA_CALL_PUB_3_DEF_1(link, saga::url, saga::url, int,

Create a symbolic link from the source entry to the target entry so that any reference to the target refers to the source entry

Parameters:
source_urlName to link, can contain wild cards
dest_urlName to link to
flagsFlags defining the operation modus
saga::name_space::None void saga::name_space::directory::link ( char const *  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ SAGA_CALL_PUB_3_DEF_1(link, std::string, saga::url, int,

Create a symbolic link from the source entry to the target entry so that any reference to the target refers to the source entry

Parameters:
source_urlName to link, can contain wild cards
dest_urlName to link to
flagsFlags defining the operation modus
saga::task saga::name_space::directory::link ( char const *  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ template <class tag>="">

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.

Parameters:
source_urlName to move
dest_urlName to move to
flagsFlags defining the operation modus
saga::name_space::None void saga::name_space::directory::move ( std::string  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ SAGA_CALL_PUB_3_DEF_1(move, saga::url, saga::url, int,

Rename source to target, or move source to target if target is an directory.

Parameters:
source_urlName to move, can contain wild cards
dest_urlName to move to
flagsFlags defining the operation modus
saga::name_space::None void saga::name_space::directory::move ( char const *  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ SAGA_CALL_PUB_3_DEF_1(move, std::string, saga::url, int,

Rename source to target, or move source to target if target is an directory.

Parameters:
source_urlName to move, can contain wild cards
dest_urlName to move to
flagsFlags defining the operation modus
saga::task saga::name_space::directory::move ( char const *  source_url,
saga::url  dest_url,
int  flags = saga::name_space::None 
) [inline]

@ template <class tag>="">

void saga::name_space::directory::remove ( saga::url  url,
int  flags = saga::name_space::None 
) [inline]

Removes the entry.

Parameters:
urlEntry to be removed
void saga::name_space::directory::remove ( std::string  url,
int  flags = saga::name_space::None 
) [inline]

Removes the entry.

@ SAGA_CALL_PUB_2_DEF_1(remove, saga::url, int, saga::name_space::None)

Parameters:
urlEntry to be removed, can contain wild cards
void saga::name_space::directory::remove ( char const *  url,
int  flags = saga::name_space::None 
) [inline]

Removes the entry.

@ SAGA_CALL_PUB_2_DEF_1(remove, std::string, int, saga::name_space::None)

Parameters:
urlEntry to be removed, can contain wild cards
saga::task saga::name_space::directory::remove ( char const *  url,
int  flags = saga::name_space::None 
) [inline]

@ template <class tag>="">

void saga::name_space::directory::make_dir ( saga::url  url,
int  flags = saga::name_space::None 
) [inline]

Creates a new directory.

Parameters:
urlDirectory to create
saga::name_space::entry saga::name_space::directory::open ( saga::url  url,
int  flags = saga::name_space::Read 
) [inline]

Creates a new namespace_entry instance.

@ SAGA_CALL_PUB_2_DEF_1(make_dir, saga::url, int, saga::name_space::None)

Parameters:
urlEntry
flagsFlags defining the operation modus
Returns:
Opened entry instance

Reimplemented in saga::advert::directory, saga::cpr::directory, saga::filesystem::directory, and saga::replica::logical_directory.

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.

@ SAGA_CALL_PUB_2_DEF_1(open, saga::url, int, saga::name_space::Read)

Parameters:
urlDirectory to open
flagsFlags defining the operation
Returns:
Opened directory instance

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.

Parameters:
targetentry to set permissions for
idid to set permission for
permpermission to enable
flagsmode of operation
None void saga::name_space::directory::permissions_deny ( saga::url  target,
std::string  id,
int  perm,
int  flags = None 
) [inline]

Disable a permission.

Parameters:
targetentry to set permissions for
idid to set permission for
permpermission to disable
flagsmode of operation
None void saga::name_space::directory::permissions_allow ( std::string  target,
std::string  id,
int  perm,
int  flags = None 
) [inline]

Enable a permission.

Parameters:
targetentry to set permissions for, may contain wild cards
idid to set permission for
permpermission to enable
flagsmode of operation
None void saga::name_space::directory::permissions_deny ( std::string  target,
std::string  id,
int  perm,
int  flags = None 
) [inline]

Disable a permission.

Parameters:
targetentry to set permissions for, may contain wild cards
idid to set permission for
permpermission to disable
flagsmode of operation
None void saga::name_space::directory::permissions_allow ( char const *  target,
std::string  id,
int  perm,
int  flags = None 
) [inline]

Enable a permission.

Parameters:
targetentry to set permissions for, may contain wild cards
idid to set permission for
permpermission to enable
flagsmode of operation
saga::task saga::name_space::directory::permissions_allow ( char const *  target,
std::string  id,
int  perm,
int  flags = None 
) [inline]

@ template <class tag>="">

void saga::name_space::directory::permissions_deny ( char const *  target,
std::string  id,
int  perm,
int  flags = None 
) [inline]

Disable a permission.

Parameters:
targetentry to set permissions for, may contain wild cards
idid to set permission for
permpermission to disable
flagsmode of operation
saga::task saga::name_space::directory::permissions_deny ( char const *  target,
std::string  id,
int  perm,
int  flags = None 
) [inline]

@ template <class tag>="">


Member Data Documentation

@ SAGA_CALL_CONST_PUB_2_DEF_1(find, std::string,

@ SAGA_CALL_PUB_4_DEF_1 (permissions_deny, std::string, std::string,

@ SAGA_CALL_PUB_4_DEF_1 (permissions_allow, std::string, std::string,

@ SAGA_CALL_PUB_4_DEF_1 (permissions_deny, saga::url, std::string,

@ SAGA_CALL_PUB_4_DEF_1 (permissions_allow, saga::url, std::string,

Reimplemented in saga::cpr::directory.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines