Search Results

A class implementing methods to work with files. More...

#include <FileUtils.h>

Static Public Member Functions

static void createDir (const std::string &dirName)
Creates a directory with the given name, if it does not exist. More...
 
static void createCleanDir (const std::string &dirName)
Creates a clean directory with the given name. More...
 
static long reportFileSize (const std::string &path, const std::string &logicalName="")
Prints the size of the given directory. More...
 
static bool fileExists (const std::string &filepath)
Returns true iff the file of the given path exists. More...
 

Detailed Description

A class implementing methods to work with files.

Member Function Documentation

◆ createCleanDir()

void helayers::FileUtils::createCleanDir ( const std::string &  dirName)
static

Creates a clean directory with the given name.

If there is a directory with the given name already, all of its content is cleaned.

Parameters
dirNameThe name of the directory to create.
Exceptions
runtime_errorIf the length of "dirName" is less than 3.

◆ createDir()

void helayers::FileUtils::createDir ( const std::string &  dirName)
static

Creates a directory with the given name, if it does not exist.

If there is a directory with the given name already, does nothing.

Parameters
dirNameThe name of the directory to create.

◆ fileExists()

bool helayers::FileUtils::fileExists ( const std::string &  filepath)
static

Returns true iff the file of the given path exists.

Parameters
pathThe relative path of the checked file

◆ reportFileSize()

long helayers::FileUtils::reportFileSize ( const std::string &  path,
const std::string &  logicalName = "" 
)
static

Prints the size of the given directory.

Parameters
pathThe relative path of the directory to report its size.
logicalNameThe title used in the size report message. If empty, "path" is used instead.

The documentation for this class was generated from the following files:
  • /opt/IBM/FHE-distro/ML-HElib/src/helayers/hebase/FileUtils.h
  • /opt/IBM/FHE-distro/ML-HElib/src/helayers/hebase/FileUtils.cpp