Public Member Functions | Private Attributes | List of all members
PLMD::Tools::DirectoryChanger Class Reference

Tiny class that changes directory and comes back when going out of scope. More...

#include <Tools.h>

Public Member Functions

 DirectoryChanger (const char *path)
 
 ~DirectoryChanger ()
 

Private Attributes

const std::filesystem::path path
 

Detailed Description

Tiny class that changes directory and comes back when going out of scope.

In case system calls to change dir are not available it throws an exception.

Warning
By construction, changing directory breaks thread safety! Use with care.

Constructor & Destructor Documentation

◆ DirectoryChanger()

PLMD::Tools::DirectoryChanger::DirectoryChanger ( const char *  path)
explicit

◆ ~DirectoryChanger()

PLMD::Tools::DirectoryChanger::~DirectoryChanger ( )

Member Data Documentation

◆ path

const std::filesystem::path PLMD::Tools::DirectoryChanger::path
private

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