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:

Inheritance graph
[legend]

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.
std::vector< saga::urlfind (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.


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


Constructor & Destructor Documentation

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::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::NSDirectory.

saga::name_space::directory::directory ( saga::object const &  o  )  [explicit]

saga::name_space::directory::directory ( void   ) 

saga::name_space::directory::~directory ( void   ) 


Member Function Documentation

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:
target Directory 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.

Parameters:
pattern Name or pattern to list
Returns:
Array of names matching the pattern

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:
pattern Pattern for names of entries to be found
flags Flags defining the operation modus
Returns:
Array of names matching the pattern

saga::url saga::name_space::directory::read_link ( saga::url  url  )  const [inline]

Returns the name of the link target.

Parameters:
url Name to be resolved
Returns:
Resolved name

bool saga::name_space::directory::exists ( saga::url  url  )  const [inline]

Returns true if entry exists, false otherwise.

Parameters:
url Name 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.

Parameters:
url Name to be tested
Returns:
boolean indicating if name is a directory

References saga::task::get_result().

bool saga::name_space::directory::is_entry ( saga::url  url  )  const [inline]

Tests name for being a namespace_entry.

Parameters:
url Name to be tested
Returns:
Boolean indicating if name is a non-directory entry

References saga::task::get_result().

bool saga::name_space::directory::is_link ( saga::url  url  )  const [inline]

Tests name for beeing a symbolic link.

Parameters:
url Name to be tested
Returns:
Boolean indicating if name is a link

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.

Returns:
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]

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

Parameters:
entry Index of entry to get
Returns:
Name of entry at index

References saga::task::get_result().

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.

Parameters:
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.

Parameters:
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.

Parameters:
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 ( 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_url Name to link
dest_url Name to link 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]

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_url Name to link, can contain wild cards
dest_url Name to link to
flags Flags defining the operation modus

void saga::name_space::directory::link ( char const *  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_url Name to link, can contain wild cards
dest_url Name to link to
flags Flags defining the operation modus

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_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.

Parameters:
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.

Parameters:
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]

Removes the entry.

Parameters:
url Entry to be removed

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

Removes the entry.

Parameters:
url Entry 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.

Parameters:
url Entry to be removed, can contain wild cards

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

Creates a new directory.

Parameters:
url Directory to create

References saga::task::get_result().

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.

Parameters:
url Entry
flags Flags defining the operation modus
Returns:
Opened entry instance

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.

Parameters:
url Directory to open
flags Flags 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:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
target entry to set permissions for, may contain wild cards
id id to set permission for
perm permission to disable
flags mode of operation


The documentation for this class was generated from the following files:

Generated on Mon Aug 24 09:04:22 2009 for SAGA C++ API by  doxygen 1.5.6