ROSE  0.9.10.6
Public Member Functions | List of all members
Sawyer::FileSystem::TemporaryDirectory Class Reference

Description

Create a temporary directory.

Creates a directory with the specified name (or a pseudo-random name in the system temp directory), and makes sure it gets deleted recursively upon object destruction.

Definition at line 61 of file Sawyer/FileSystem.h.

#include <FileSystem.h>

Inheritance diagram for Sawyer::FileSystem::TemporaryDirectory:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::FileSystem::TemporaryDirectory:
Collaboration graph
[legend]

Public Member Functions

 TemporaryDirectory ()
 Create a temporary subdirectory in the system's temp directory. More...
 
 TemporaryDirectory (const boost::filesystem::path &name)
 Create a temporary directory with the specified name. More...
 
 ~TemporaryDirectory ()
 Recursively unlink the temporary directory. More...
 
const boost::filesystem::path & name () const
 Path of temporary directory. More...
 

Constructor & Destructor Documentation

Sawyer::FileSystem::TemporaryDirectory::TemporaryDirectory ( )
inline

Create a temporary subdirectory in the system's temp directory.

The directory is recursively unlinked from the filesystem when this object is destroyed.

Definition at line 68 of file Sawyer/FileSystem.h.

Sawyer::FileSystem::TemporaryDirectory::TemporaryDirectory ( const boost::filesystem::path &  name)
inlineexplicit

Create a temporary directory with the specified name.

Creates the specified directory. Parent directories must already exist. The directory is recursively unlinked from the filesystem when this object is destroyed.

Definition at line 77 of file Sawyer/FileSystem.h.

Sawyer::FileSystem::TemporaryDirectory::~TemporaryDirectory ( )
inline

Recursively unlink the temporary directory.

This destructor recursively unlinks the directory and its contents from the filesystem, but does not remove any parent directories even if they would become empty.

Definition at line 86 of file Sawyer/FileSystem.h.

Member Function Documentation

const boost::filesystem::path& Sawyer::FileSystem::TemporaryDirectory::name ( ) const
inline

Path of temporary directory.

Definition at line 91 of file Sawyer/FileSystem.h.


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