|
Gradient Augmented Levelset Implementation in CPU & GPU
|
#include <file-utils.h>
Public Member Functions | |
| FileUtils () | |
| ~FileUtils () | |
| void | setRootDirectory (const std::string root_dir) |
| const std::string | getRootDirectory () const |
| bool | fileExists (const std::string file_name) const |
| bool | removeFile (const std::string file_name) const |
| bool | createDirectory (const std::string dir_name) const |
| bool | removeDirectory (const std::string dir_name) const |
| template<typename T > | |
| void | write (const std::string file_name, const T &field) |
Class to handle file utilities, such as writing, reading.
Definition at line 47 of file file-utils.h.
| FileUtils | ( | ) |
Default constructor.
Definition at line 43 of file file-utils.cc.
| ~FileUtils | ( | ) |
Destructor
Definition at line 45 of file file-utils.cc.
| bool createDirectory | ( | const std::string | dir_name | ) | const |
Create directory.
This function creates any non-existing directories in the path.
| dir_name | name of the directory to create. |
Definition at line 65 of file file-utils.cc.
| bool fileExists | ( | const std::string | file_name | ) | const |
Checks if file exists or not.
| file_name | name of file with relative or absolute path. |
Definition at line 51 of file file-utils.cc.
| const std::string getRootDirectory | ( | ) | const |
| bool removeDirectory | ( | const std::string | dir_name | ) | const |
Remove directory path.
| dir_name | name of the path to remove. |
Definition at line 76 of file file-utils.cc.
| bool removeFile | ( | const std::string | file_name | ) | const |
Remove file.
| file_name | name of file with relative or absolute path. |
Definition at line 58 of file file-utils.cc.
| void setRootDirectory | ( | const std::string | root_dir | ) |
Set root directory path.
| root_dir | name of root directory. |
Definition at line 47 of file file-utils.cc.
| template void write< GALS::CPU::Array< GALS::CPU::Grid< double, 3 >, GALS::CPU::Vec3< double > > > | ( | const std::string | file_name, |
| const T & | field | ||
| ) |
Write to file.
| file_name | name of the file. |
| field | variable whose data will be written to a file. |
Definition at line 84 of file file-utils.cc.