#include <file.hpp>
|
| static const char | SEP = '/' |
| |
File class utility
- Author
- Vincent Lachenal
| File::File |
( |
const std::string & |
path, |
|
|
bool |
init = true |
|
) |
| |
File constructor
- Parameters
-
| path | The File path |
| init | Initialize file members |
| File::File |
( |
const std::string & |
parent, |
|
|
const std::string & |
name |
|
) |
| |
File constructor
- Parameters
-
| parent | The parent File path |
| name | The File name |
| File::File |
( |
const File & |
parent, |
|
|
const std::string & |
name |
|
) |
| |
File constructor
- Parameters
-
File constructor
- Parameters
-
| File::File |
( |
std::shared_ptr< File > |
parent, |
|
|
const std::string & |
name |
|
) |
| |
File constructor
- Parameters
-
File constructor
- Parameters
-
| File::File |
( |
const File & |
file | ) |
|
File copy constructor
- Parameters
-
| bool anch::file::File::canExecute |
( |
| ) |
const |
|
inline |
Return the executable state
- Returns
true is the File can be executed, false otherwise.
| bool anch::file::File::canRead |
( |
| ) |
const |
|
inline |
Return the readable state
- Returns
true is the File can be read, false otherwise.
| bool anch::file::File::canWrite |
( |
| ) |
const |
|
inline |
Return the writable state
- Returns
true is the File can be written, false otherwise.
Create directory
- Parameters
-
| parents | Create parent directories if needed |
- Exceptions
-
Create directory
- Parameters
-
| parents | Create parent directories if needed |
- Exceptions
-
Create a new file
- Exceptions
-
Create a new file
- Exceptions
-
Create a new file
- Parameters
-
| out | The output stream on the file |
- Exceptions
-
Create a new file
- Parameters
-
| out | The output stream on the file |
- Exceptions
-
Delete this File
- Exceptions
-
Delete this File
- Exceptions
-
| bool anch::file::File::exists |
( |
| ) |
const |
|
inline |
Check if File exist.
- Returns
true if File exists, false otherwise.
File last access getter
- Returns
- the File last access
File last modification getter
- Returns
- the File last modification
File last status change getter
- Returns
- the File last status change
| std::shared_ptr<File> anch::file::File::getParent |
( |
| ) |
const |
|
inline |
Get the parent File
- Returns
- the parent File
| const std::string& anch::file::File::getPath |
( |
| ) |
const |
|
inline |
| uint64_t anch::file::File::getSize |
( |
| ) |
const |
|
inline |
| bool anch::file::File::isDirectory |
( |
| ) |
const |
|
inline |
Check is File is a directory.
- Returns
true if File is a directory, false otherwise.
| bool anch::file::File::isFile |
( |
| ) |
const |
|
inline |
Check is File is a regular file.
- Returns
true if File is a regular file, false otherwise.
List files and directories in current directory.
- Parameters
-
- Exceptions
-
List files and directories in current directory.
- Returns
- The files list
- Exceptions
-
List files and directories in current directory.
- Parameters
-
- Exceptions
-
List files and directories in current directory.
- Returns
- The File list
- Exceptions
-
| const char File::SEP = '/' |
|
static |
The documentation for this class was generated from the following files:
- anch-file/inc/file/file.hpp
- anch-file/src/file/file.cpp