# saga::filesystem::directory Class Reference

The SAGA file package directory API. More...

`#include <directory.hpp>`

Inheritance diagram for saga::filesystem::directory:

[legend]

List of all members.

## Public Member Functions
| directory (session const &s, saga::url url, int mode=ReadWrite)
| Open the directory.
| directory (saga::url url, int mode=ReadWrite)
| Open the directory.
| directory (saga::object const &o)
| Open the directory.
| directory (void)
| Open the directory.
| ~directory (void)
| Destroy the directory object.
directory & | operator= (saga::object const &o)
| Brief description starts here.
saga::off_t | get_size (saga::url url)
| Returns the number of bytes in the file.
bool | is_file (saga::url url)
| Alias for is_entry in saga::ns_directory.
saga::filesystem::file | open (saga::url url, int flags=saga::filesystem::Read)
| Creates a new file instance.
saga::filesystem::directory | open_dir (saga::url url, int flags=saga::filesystem::ReadWrite)
| Creates a directory object.
## Static Public Member Functions
static directory | create (session const &s, saga::url url, int mode=Read)
| Factory function resembling directory(session, url, int) constructor.
static directory | create (saga::url url, int mode=Read)
| Factory function resembling 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

The SAGA file package directory API.

## Constructor & Destructor Documentation

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

Open the directory.

saga::filesystem::directory::directory | ( | saga::url | url,
|  | int | mode = `ReadWrite` |
| ) |  |  | `[explicit]`

Open the directory.

saga::filesystem::directory::directory | ( | saga::object const & | o | ) | `[explicit]`

Open the directory.

Reimplemented from saga::name_space::directory.

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

saga::filesystem::directory::directory | ( | void |  | ) |

Open the directory.

Reimplemented from saga::name_space::directory.

Referenced by create().

saga::filesystem::directory::~directory | ( | void |  | ) |

Destroy the directory object.

Reimplemented from saga::name_space::directory.

## Member Function Documentation

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

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

Reimplemented from saga::name_space::directory.

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

Factory function resembling directory(url, int) constructor.

Reimplemented from saga::name_space::directory.

References directory().

template<typename Tag>

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

Factory function resembling entry(url, int) constructor.

Reimplemented from saga::name_space::directory.

directory & saga::filesystem::directory::operator= | ( | saga::object const & | o | ) |

Brief description starts here.

Reimplemented from saga::name_space::directory.

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

saga::off_t saga::filesystem::directory::get_size | ( | saga::url | url | ) | `[inline]`

Returns the number of bytes in the file.

Returns:
  Number of bytes in the file.

Parameters:

  | url | Name of file to inspect.

bool saga::filesystem::directory::is_file | ( | saga::url | url | ) | `[inline]`

Alias for is_entry in saga::ns_directory.

saga::filesystem::file saga::filesystem::directory::open | ( | saga::url | url,
|  | int | flags = `saga::filesystem::Read` |
| ) |  |  | `[inline]`

Creates a new file instance.

Parameters:

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

Returns:
  Opened file instance

Reimplemented from saga::name_space::directory.

saga::filesystem::directory saga::filesystem::directory::open_dir | ( | saga::url | url,
|  | int | flags = `saga::filesystem::ReadWrite` |
| ) |  |  | `[inline]`

Creates a directory object.

Returns:
  Opened directory instance

Parameters:

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

Reimplemented from saga::name_space::directory.

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

- directory.hpp
- directory.cpp