MNE-CPP  0.1.9
A Framework for Electrophysiology
Static Public Member Functions | List of all members
UTILSLIB::File Class Reference

#include <file.h>

Static Public Member Functions

static bool exists (const char *filePath)
 
static bool exists (const std::string &filePath)
 
static bool copy (const char *sourcePath, const char *destPath)
 
static bool copy (const std::string &sourcePath, const std::string &destPath)
 
static bool rename (const char *sourcePath, const char *destPath)
 
static bool rename (const std::string &sourcePath, const std::string &destPath)
 
static bool remove (const char *filePath)
 
static bool remove (const std::string &filePath)
 
static bool create (const char *filePath)
 
static bool create (const std::string &filePath)
 

Detailed Description

Class contianing static functions for common file operations.

Definition at line 64 of file file.h.

Member Function Documentation

◆ copy() [1/2]

bool File::copy ( const char *  sourcePath,
const char *  destPath 
)
static

Copies file based on input parameters. Does nothing if source file does not exists or if destination file already exists.

Parameters
[in]sourcePath
[in]destPath
Returns
Returns true if copy was performed successfully, false otherwise.

Definition at line 69 of file file.cpp.

◆ copy() [2/2]

bool File::copy ( const std::string &  sourcePath,
const std::string &  destPath 
)
static

Copies file based on input parameters. Does nothing if source file does not exists or if destination file already exists.

Parameters
[in]sourcePath
[in]destPath
Returns
Returns true if copy was performed successfully, false otherwise.

Definition at line 86 of file file.cpp.

◆ create() [1/2]

bool File::create ( const char *  filePath)
static

Attempts to create a file at filePath. Does nothing if file already exists.

Parameters
[in]filePathFile path of new file to be created.
Returns
Returns whether file was created, false otherwise.

Definition at line 128 of file file.cpp.

◆ create() [2/2]

bool File::create ( const std::string &  filePath)
static

Attempts to create a file at filePath. Does nothing if file already exists.

Parameters
[in]filePathFile path of new file to be created.
Returns
Returns whether file was created, false otherwise.

Definition at line 141 of file file.cpp.

◆ exists() [1/2]

bool File::exists ( const char *  filePath)
static

Returns whether file at given input parameter exists

Parameters
[in]filePathfile to be checked
Returns
Returns whther file exists.

Definition at line 54 of file file.cpp.

◆ exists() [2/2]

bool File::exists ( const std::string &  filePath)
static

Returns whether file at given input parameter exists

Parameters
[in]filePathfile to be checked
Returns
Returns whther file exists.

Definition at line 62 of file file.cpp.

◆ remove() [1/2]

bool File::remove ( const char *  filePath)
static

Attempts to remove file at given input param. Does nothing if file already does not exists.

Parameters
[in]filePathFile path to file to be deleted.
Returns
Returns whether file was removed, false otherwise.

Definition at line 110 of file file.cpp.

◆ remove() [2/2]

bool File::remove ( const std::string &  filePath)
static

Attempts to remove file at given input param. Does nothing if file already does not exists.

Parameters
[in]filePathFile path to file to be deleted.
Returns
Returns whether file was removed, false otherwise.

Definition at line 121 of file file.cpp.

◆ rename() [1/2]

bool File::rename ( const char *  sourcePath,
const char *  destPath 
)
static

Attempts to rename file based on input parameters. Does nothing if source file does not exists or if destination file already exists.

Parameters
[in]sourcePath
[in]destPath
Returns
Whether file was renamed successfully, false otherwise.

Definition at line 93 of file file.cpp.

◆ rename() [2/2]

bool File::rename ( const std::string &  sourcePath,
const std::string &  destPath 
)
static

Attempts to rename file based on input parameters. Does nothing if source file does not exists or if destination file already exists.

Parameters
[in]sourcePath
[in]destPath
Returns
Whether file was renamed successfully, false otherwise.

Definition at line 103 of file file.cpp.


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