# saga::replica::logical_directory Class Reference

A logical directory represents a directory entry in the name space of logical files. More...

`#include <logical_directory.hpp>`

Inheritance diagram for saga::replica::logical_directory:

[legend]

List of all members.

## Public Member Functions
| logical_directory (session const &s, saga::url url, int mode=saga::replica::ReadWrite)
| Creates the object.
| logical_directory (saga::url url, int mode=saga::replica::ReadWrite)
| Creates the object.
| logical_directory (saga::object const &o)
| Creates the object.
| logical_directory (void)
| Creates the object.
| ~logical_directory (void)
| Destroys the object.
logical_directory & | operator= (saga::object const &o)
| Brief description starts here.
bool | is_file (saga::url url)
| Alias for is_entry of saga::ns_directory.
saga::replica::logical_file | open (saga::url url, int flags=saga::replica::Read)
| Creates a new logical_file instance.
saga::replica::logical_directory | open_dir (saga::url url, int flags=saga::replica::Read)
| Creates a new logical_directory instance.
std::vector< saga::url > | find (std::string name_pattern, std::vector< std::string > key_pattern, int flags=saga::replica::Recursive)
| Find entries in the current directory and below, with matching names and matching meta data.
## Static Public Member Functions
static logical_directory | create (session const &s, saga::url url, int mode=Read)
| Factory function resembling logical_directory(session, url, int) constructor.
static logical_directory | create (saga::url url, int mode=Read)
| Factory function resembling logical_directory(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 logical directory represents a directory entry in the name space of logical files.

Several replica system implementations have the notion of containers, which, for our purposes, represent directories which can have, just as logical files, associated sets of meta data. In the presented API, logical directories and containers are the same.

## Constructor & Destructor Documentation

saga::replica::logical_directory::logical_directory | ( | session const & | s,
|  | saga::url | url,
|  | int | mode = `saga::replica::ReadWrite` |
| ) |  |  |

Creates the object.

saga::replica::logical_directory::logical_directory | ( | saga::url | url,
|  | int | mode = `saga::replica::ReadWrite` |
| ) |  |  | `[explicit]`

Creates the object.

saga::replica::logical_directory::logical_directory | ( | saga::object const & | o | ) | `[explicit]`

Creates the object.

References saga::BadParameter, saga::object::get_type(), and saga::object::LogicalDirectory.

saga::replica::logical_directory::logical_directory | ( | void |  | ) |

Creates the object.

saga::replica::logical_directory::~logical_directory | ( | void |  | ) |

Destroys the object.

## Member Function Documentation

static logical_directory saga::replica::logical_directory::create | ( | session const & | s,
|  | saga::url | url,
|  | int | mode = `Read` |
| ) |  |  | `[inline, static]`

Factory function resembling logical_directory(session, url, int) constructor.

Reimplemented from saga::name_space::directory.

static logical_directory saga::replica::logical_directory::create | ( | saga::url | url,
|  | int | mode = `Read` |
| ) |  |  | `[inline, static]`

Factory function resembling logical_directory(url, int) constructor.

Reimplemented from saga::name_space::directory.

template<typename Tag>

static saga::task saga::replica::logical_directory::create | ( | saga::url | url,
|  | int | mode = `Read` |
| ) |  |  | `[inline, static]`

Factory function resembling entry(url, int) constructor.

Reimplemented from saga::name_space::directory.

logical_directory & saga::replica::logical_directory::operator= | ( | saga::object const & | o | ) |

Brief description starts here.

Reimplemented from saga::name_space::directory.

References saga::name_space::directory::operator=().

bool saga::replica::logical_directory::is_file | ( | saga::url | url | ) | `[inline]`

Alias for is_entry of saga::ns_directory.

saga::replica::logical_file saga::replica::logical_directory::open | ( | saga::url | url,
|  | int | flags = `saga::replica::Read` |
| ) |  |  | `[inline]`

Creates a new logical_file instance.

Parameters:

  | url | File to be opened
  | flags | Flags definition operation modus

Returns:
  Opened file instance

Reimplemented from saga::name_space::directory.

saga::replica::logical_directory saga::replica::logical_directory::open_dir | ( | saga::url | url,
|  | int | flags = `saga::replica::Read` |
| ) |  |  | `[inline]`

Creates a new logical_directory instance.

Parameters:

  | url | Name of directory to open
  | flags | Flags definition operation modus

Returns:
  Opened directory instance

Reimplemented from saga::name_space::directory.

std::vector<saga::url> saga::replica::logical_directory::find | ( | std::string | name_pattern,
|  | std::vector< std::string > | key_pattern,
|  | int | flags = `saga::replica::Recursive` |
| ) |  |  | `[inline]`

Find entries in the current directory and below, with matching names and matching meta data.

Parameters:

  | name_pattern | Pattern for names of entries to be found
  | key_pattern | Pattern for meta data of entries to be found
  | flags | Flags defining the operation modus

Returns:
  Array of names matching both pattern

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

- logical_directory.hpp
- logical_directory.cpp