Base class and factory for files.
More...
#include <file.h>
|
static std::unique_ptr< File > | fromContentWithName (const std::string &content, const std::string &name) |
| Returns a file containing the given content with the given name. More...
|
|
static std::unique_ptr< File > | fromFilesystem (const std::string &path) |
| Returns a file from the given path. More...
|
|
static std::unique_ptr< File > | fromFilesystemWithOtherName (const std::string &path, const std::string &name) |
| Returns a file from the given path, but with a custom name. More...
|
|
Base class and factory for files.
retdec::File::File |
( |
const File & |
| ) |
|
|
delete |
retdec::File::File |
( |
File && |
| ) |
|
|
delete |
std::unique_ptr< File > retdec::File::fromContentWithName |
( |
const std::string & |
content, |
|
|
const std::string & |
name |
|
) |
| |
|
static |
Returns a file containing the given content with the given name.
- Parameters
-
[in] | content | Content of the file. |
[in] | name | Name of the file. |
std::unique_ptr< File > retdec::File::fromFilesystem |
( |
const std::string & |
path | ) |
|
|
static |
Returns a file from the given path.
- Parameters
-
[in] | path | Path to the file. |
The name of the file is obtained automatically.
std::unique_ptr< File > retdec::File::fromFilesystemWithOtherName |
( |
const std::string & |
path, |
|
|
const std::string & |
name |
|
) |
| |
|
static |
Returns a file from the given path, but with a custom name.
- Parameters
-
[in] | path | Path to the file. |
[in] | name | Name to be used as the file's name. |
Use this function only if you want to choose a different name for the file than the one it already has.
retdec::File::getContent |
( |
| ) |
|
|
pure virtual |
Returns the content of the file.
retdec::File::getName |
( |
| ) |
const |
|
pure virtual |
Returns the name of the file.
When the file has no name, the empty string is returned.
File& retdec::File::operator= |
( |
const File & |
| ) |
|
|
delete |
File& retdec::File::operator= |
( |
File && |
| ) |
|
|
delete |
retdec::File::saveCopyTo |
( |
const std::string & |
directoryPath | ) |
|
|
pure virtual |
Stores a copy of the file into the given directory.
retdec::File::saveCopyTo |
( |
const std::string & |
directoryPath, |
|
|
const std::string & |
name |
|
) |
| |
|
pure virtual |
Stores a copy of the file into the given directory under the given name.
The documentation for this class was generated from the following files:
- /home/s3rvac/Projects/GitHub/Created/retdec-cpp/include/retdec/file.h
- /home/s3rvac/Projects/GitHub/Created/retdec-cpp/src/retdec/file.cpp