rippled
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ripple::detail::FileDirGuard Class Reference

Write a file in a directory and remove when done. More...

#include <FileDirGuard.h>

Inheritance diagram for ripple::detail::FileDirGuard:
Inheritance graph
[legend]
Collaboration diagram for ripple::detail::FileDirGuard:
Collaboration graph
[legend]

Public Member Functions

 FileDirGuard (beast::unit_test::suite &test, path subDir, path file, std::string const &contents, bool useCounter=true, bool create=true)
 
 ~FileDirGuard ()
 
path const & file () const
 
bool fileExists () const
 
path const & subdir () const
 

Protected Types

using path = boost::filesystem::path
 

Protected Member Functions

auto rmDir (path const &toRm)
 

Protected Attributes

path const file_
 
bool created_ = false
 
beast::unit_test::suitetest_
 

Private Attributes

path subDir_
 
bool rmSubDir_ {false}
 

Detailed Description

Write a file in a directory and remove when done.

Definition at line 91 of file FileDirGuard.h.

Member Typedef Documentation

◆ path

using ripple::detail::DirGuard::path = boost::filesystem::path
protectedinherited

Definition at line 21 of file FileDirGuard.h.

Constructor & Destructor Documentation

◆ FileDirGuard()

ripple::detail::FileDirGuard::FileDirGuard ( beast::unit_test::suite test,
path  subDir,
path  file,
std::string const &  contents,
bool  useCounter = true,
bool  create = true 
)

Definition at line 98 of file FileDirGuard.h.

◆ ~FileDirGuard()

ripple::detail::FileDirGuard::~FileDirGuard ( )

Definition at line 124 of file FileDirGuard.h.

Member Function Documentation

◆ file()

path const & ripple::detail::FileDirGuard::file ( ) const

Definition at line 148 of file FileDirGuard.h.

◆ fileExists()

bool ripple::detail::FileDirGuard::fileExists ( ) const

Definition at line 154 of file FileDirGuard.h.

◆ rmDir()

auto ripple::detail::DirGuard::rmDir ( path const &  toRm)
protectedinherited

Definition at line 31 of file FileDirGuard.h.

◆ subdir()

path const & ripple::detail::DirGuard::subdir ( ) const
inherited

Definition at line 82 of file FileDirGuard.h.

Member Data Documentation

◆ file_

path const ripple::detail::FileDirGuard::file_
protected

Definition at line 94 of file FileDirGuard.h.

◆ created_

bool ripple::detail::FileDirGuard::created_ = false
protected

Definition at line 95 of file FileDirGuard.h.

◆ subDir_

path ripple::detail::DirGuard::subDir_
privateinherited

Definition at line 24 of file FileDirGuard.h.

◆ rmSubDir_

bool ripple::detail::DirGuard::rmSubDir_ {false}
privateinherited

Definition at line 25 of file FileDirGuard.h.

◆ test_

beast::unit_test::suite& ripple::detail::DirGuard::test_
protectedinherited

Definition at line 28 of file FileDirGuard.h.