This class implements a scoped file object which will delete the underlying file from the filesystem when the scope ends.
More...
#include <File.h>
|
| | ScopedFile (ScopedFile &&scopedFile) |
| | Move constructor.
|
| | ScopedFile (const File &file) |
| | Create a new scoped file.
|
| | ScopedFile (const std::string &filename) |
| | Create a new scoped file.
|
| | ~ScopedFile () |
| | Destructs this object and deletes the actual file.
|
| ScopedFile & | operator= (ScopedFile &&scopedFile) |
| | Move operator.
|
| | File () |
| | Creates an empty file.
|
| | File (const std::string &filename) |
| | Create a new file.
|
| bool | isValid () const override |
| | Returns whether the path is valid.
|
| bool | exists () const override |
| | Returns whether the file exists already.
|
| bool | remove () const |
| | Removes this file from the filesystem.
|
| std::string | base () const |
| | Returns the base of this file.
|
| std::string | extension () const |
| | Returns the extension of this file.
|
| std::string | name () const |
| | Returns the name of this file.
|
| std::string | baseName () const |
| | Returns the base name of this file.
|
| virtual | ~Path ()=default |
| | Destructs a path.
|
| Type | type () const |
| | Returns the type of this path.
|
| bool | isAbsolute () const |
| | Returns whether this path is absolute.
|
| bool | isRelative () const |
| | Returns whether this path is relative.
|
| bool | isNull () const |
| | Returns whether this path holds no valid.
|
| bool | operator== (const Path &right) const |
| | Returns whether two paths are equal.
|
| bool | operator!= (const Path &path) const |
| | Returns whether two paths are not equal.
|
| const std::string & | operator() () const |
| | Returns the value of this path.
|
| bool | operator< (const Path &path) const |
| | Less operator comparing the actual strings of two paths.
|
|
| | ScopedFile (const ScopedFile &scopedFile)=delete |
| | Disabled copy constructor.
|
| ScopedFile & | operator= (const ScopedFile &scopedFile)=delete |
| | Disabled copy constructor.
|
| | Path ()=default |
| | Creates a new undefined path.
|
| | Path (const Path &path)=default |
| | Copy constructor.
|
| | Path (const std::string &value) |
| | Creates a new path.
|
| void | checkPath (const Type expectType) |
| | Checks the type of this path and trims it.
|
| void | trim () |
| | Trims this path.
|
| Path & | operator= (const Path &path)=default |
| | Default assign operator.
|
This class implements a scoped file object which will delete the underlying file from the filesystem when the scope ends.
- See also
- File
◆ ScopedFile() [1/4]
| Ocean::IO::ScopedFile::ScopedFile |
( |
ScopedFile && | scopedFile | ) |
|
|
inline |
Move constructor.
- Parameters
-
| scopedFile | The scoped file to be moved |
◆ ScopedFile() [2/4]
| Ocean::IO::ScopedFile::ScopedFile |
( |
const File & | file | ) |
|
|
inlineexplicit |
Create a new scoped file.
- Parameters
-
| file | The file for which the new scoped object will be created |
◆ ScopedFile() [3/4]
| Ocean::IO::ScopedFile::ScopedFile |
( |
const std::string & | filename | ) |
|
|
inlineexplicit |
Create a new scoped file.
- Parameters
-
| filename | The name of the file for which a new scoped object will be created |
◆ ~ScopedFile()
| Ocean::IO::ScopedFile::~ScopedFile |
( |
| ) |
|
Destructs this object and deletes the actual file.
◆ ScopedFile() [4/4]
| Ocean::IO::ScopedFile::ScopedFile |
( |
const ScopedFile & | scopedFile | ) |
|
|
protecteddelete |
Disabled copy constructor.
- Parameters
-
| scopedFile | File which would be copied |
◆ operator=() [1/2]
Disabled copy constructor.
- Parameters
-
| scopedFile | File which would be copied |
- Returns
- Reference to this object
◆ operator=() [2/2]
Move operator.
- Parameters
-
| scopedFile | The scoped file to be moved |
- Returns
- Reference to this object
The documentation for this class was generated from the following file: