# gdcm::Directory Class Reference

Class for manipulation directories. More...

`#include <gdcmDirectory.h>`

Collaboration diagram for gdcm::Directory:
[legend]

List of all members.

## Public Types
typedef std::vector< FilenameType > | FilenamesType
typedef std::string | FilenameType
## Public Member Functions
| Directory ()
| ~Directory ()
FilenamesType const & | GetDirectories () const
| Return the Directories traversed.
FilenamesType const & | GetFilenames () const
| Set/Get the file names within the directory.
FilenameType const & | GetToplevel () const
| Get the name of the toplevel directory.
unsigned int | Load (FilenameType const &name, bool recursive=false)
void | Print (std::ostream &os=std::cout) const
| Print.
## Protected Member Functions
unsigned int | Explore (FilenameType const &name, bool recursive)
| Return number of file found when 'recursive'ly exploring directory `name`.
## Friends
std::ostream & | operator<< (std::ostream &_os, const Directory &d)

## Detailed Description

Class for manipulation directories.

Note:
  This implementation provide a cross platform implementation for manipulating directores: basically traversing directories and harvesting files
  will not take into account unix type hidden file recursive option will not look into UNIX type hidden directory (those starting with a '.')
  Since python or C# provide there own equivalent implementation, in which case gdcm::Directory does not make much sense.

Examples:

  SortImage.cxx, and VolumeSorter.cxx.

## Member Typedef Documentation

typedef std::vector<FilenameType> gdcm::Directory::FilenamesType

typedef std::string gdcm::Directory::FilenameType

## Constructor & Destructor Documentation

gdcm::Directory::Directory | ( |  | ) | `[inline]`

gdcm::Directory::~Directory | ( |  | ) | `[inline]`

## Member Function Documentation

unsigned int gdcm::Directory::Explore | ( | FilenameType const & | name,
|  | bool | recursive |
| ) |  |  | `[protected]`

Return number of file found when 'recursive'ly exploring directory `name`.

FilenamesType const& gdcm::Directory::GetDirectories | ( |  | ) | const`[inline]`

Return the Directories traversed.

FilenamesType const& gdcm::Directory::GetFilenames | ( |  | ) | const`[inline]`

Set/Get the file names within the directory.

Examples:
  SortImage.cxx, and VolumeSorter.cxx.

FilenameType const& gdcm::Directory::GetToplevel | ( |  | ) | const`[inline]`

Get the name of the toplevel directory.

unsigned int gdcm::Directory::Load | ( | FilenameType const & | name,
|  | bool | recursive = `false` |
| ) |  |  | `[inline]`

construct a list of filenames and subdirectory beneath directory: name

Warning:
  : hidden file and hidden directory are not loaded.

Examples:
  SortImage.cxx, and VolumeSorter.cxx.

void gdcm::Directory::Print | ( | std::ostream & | os = `std::cout` | ) | const

Print.

Examples:
  SortImage.cxx.

Referenced by gdcm::operator<<().

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | _os,
|  | const Directory & | d |
| ) |  |  | `[friend]`

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

- gdcmDirectory.h