Contains file manipulation utility methods.
More...
#include <FileSystem.hpp>
|
static bool | fileExists (const std::string &filePath) |
| Check if a file exists.
|
|
static bool | deleteFile (const std::string &filePath) |
| Delete the file at filePath.
|
|
static bool | isDirectory (const std::string &path) |
| Checks if the directory exists.
|
|
static bool | createDirectory (const std::string &path) |
| Creates a directory.
|
|
Contains file manipulation utility methods.
FileSystem struct.
◆ createDirectory()
bool switchboard::FileSystem::createDirectory |
( |
const std::string & | path | ) |
|
|
static |
Creates a directory.
- Parameters
-
path | Path to the directory to be created. |
- Returns
- True if the directory was successfully created.
◆ deleteFile()
bool switchboard::FileSystem::deleteFile |
( |
const std::string & | filePath | ) |
|
|
static |
Delete the file at filePath.
- Parameters
-
filePath | Path to the file. |
- Returns
- True if the file is deleted/non-existent.
◆ fileExists()
bool switchboard::FileSystem::fileExists |
( |
const std::string & | filePath | ) |
|
|
static |
Check if a file exists.
- Parameters
-
filePath | Path to the file. |
- Returns
- True if the file exists.
◆ isDirectory()
bool switchboard::FileSystem::isDirectory |
( |
const std::string & | path | ) |
|
|
static |
Checks if the directory exists.
- Parameters
-
- Returns
- True if the file is a directory.