Crombie Tools
crombie::FileSystem Namespace Reference

Functions

std::string basename (const std::string &name)
 
bool confirm_overwrite (const std::string &path)
 If this would overwrite a directory that exists, ask for confirmation. More...
 
std::string dirname (const std::string &name)
 
bool exists (const std::string &path)
 Check if path exists (either directory or file) More...
 
unsigned long get_size (const std::string &name)
 Get the size of a file. More...
 
Types::strings list (std::string directory)
 The name of files inside of the directory. More...
 
void mkdirs (const std::string &path)
 Create directories, recursively if needed. More...
 

Function Documentation

§ basename()

std::string crombie::FileSystem::basename ( const std::string &  name)

Definition at line 18 of file FileSystem.h.

References Debug::Debug(), and crombie::Misc::split().

Referenced by dirname().

§ confirm_overwrite()

bool crombie::FileSystem::confirm_overwrite ( const std::string &  path)

If this would overwrite a directory that exists, ask for confirmation.

This returns whether or not the user confirms the file to be removed.

Definition at line 152 of file FileSystem.h.

References exists().

§ dirname()

std::string crombie::FileSystem::dirname ( const std::string &  name)

§ exists()

bool crombie::FileSystem::exists ( const std::string &  path)

Check if path exists (either directory or file)

Definition at line 87 of file FileSystem.h.

Referenced by confirm_overwrite(), crombie::Datacard::dumpplots(), crombie::FileConfig::DirectoryInfo::fillfiles(), and mkdirs().

§ get_size()

unsigned long crombie::FileSystem::get_size ( const std::string &  name)

Get the size of a file.

Definition at line 95 of file FileSystem.h.

Referenced by crombie::FileConfig::FileInfo::FileInfo().

§ list()

Types::strings crombie::FileSystem::list ( std::string  directory)

The name of files inside of the directory.

Definition at line 131 of file FileSystem.h.

Referenced by crombie::FileConfig::DirectoryInfo::fillfiles(), and CrombieTools.PlotTools.PlotStack.ParallelStackContainer::MakePlot().

§ mkdirs()

void crombie::FileSystem::mkdirs ( const std::string &  path)

Create directories, recursively if needed.

Definition at line 104 of file FileSystem.h.

References exists().

Referenced by crombie::Datacard::dumpplots().