Provides simple filesystem functions.
More...
#include <Filesystem.hpp>
|
| File (const std::string &filename) |
|
bool | exists () const noexcept |
|
const std::string & | ext () const noexcept |
|
std::string | fullName () const |
|
bool | hasExt () const |
|
const std::string & | name () const noexcept |
|
std::string | withExt (const std::string &ext) |
|
Provides simple filesystem functions.
◆ File()
nc::filesystem::File::File |
( |
const std::string & |
filename | ) |
|
|
inlineexplicit |
Constructor
- Parameters
-
filename | the full filename |
◆ exists()
bool nc::filesystem::File::exists |
( |
| ) |
const |
|
inlinenoexcept |
Tests whether or not the file exists
- Returns
- bool
◆ ext()
const std::string& nc::filesystem::File::ext |
( |
| ) |
const |
|
inlinenoexcept |
Returns the file extension without the dot
- Returns
- std::string
◆ fullName()
std::string nc::filesystem::File::fullName |
( |
| ) |
const |
|
inline |
Returns the input full filename
- Returns
- std::string
◆ hasExt()
bool nc::filesystem::File::hasExt |
( |
| ) |
const |
|
inline |
Returns true if the file has an extension
- Returns
- bool
◆ name()
const std::string& nc::filesystem::File::name |
( |
| ) |
const |
|
inlinenoexcept |
Returns the filename
- Returns
- std::string
◆ withExt()
std::string nc::filesystem::File::withExt |
( |
const std::string & |
ext | ) |
|
|
inline |
Sets the extension to the input extension. Do not input the dot. E.g. input "txt", not ".txt"
- Returns
- std::string
The documentation for this class was generated from the following file: