# File.hpp
This File On Github
Ask A Question
API: latest
module: oatpp
#include "oatpp/core/data/resource/File.hpp"
# File
File. extends - oatpp::data::Resource.
namespace oatpp { namespace data { namespace resource {
class File : public Resource {}
}}}
# Methods
Return Type | Name | Summary |
---|---|---|
[none] | File | Multiple implementations:
|
std::shared_ptr<data::stream::OutputStream> | openOutputStream | Open output stream to a file. |
std::shared_ptr<data::stream::InputStream> | openInputStream | Open input stream to a temporary file. |
oatpp::String | getInMemoryData | Not applicable. |
v_int64 | getKnownSize | Not applicable. |
oatpp::String | getLocation | Get location where temporary data is stored. |
# File::File
- Default constructor.
File() = default
- Constructor.
- @param fullFilename
File(const oatpp::String& fullFilename)
- Constructor.
- @param directory
- @param filename
File(const oatpp::String& directory, const oatpp::String& filename)
# File::openOutputStream
Open output stream to a file.
Note: stream also captures file-handle. The file object won't be deleted until the stream is deleted.
- @return -
std::shared_ptr
to oatpp::data::stream::OutputStream.
std::shared_ptr<data::stream::OutputStream> openOutputStream() override
# File::openInputStream
Open input stream to a temporary file.
Note: stream also captures file-handle. The file won't be deleted until the stream is deleted.
- @return -
std::shared_ptr
oatpp::data::stream::InputStream.
std::shared_ptr<data::stream::InputStream> openInputStream() override
# File::getInMemoryData
Not applicable.
- @return - always returns
nullptr
.
oatpp::String getInMemoryData() override
# File::getKnownSize
Not applicable.
- @return - always returns
-1
.
v_int64 getKnownSize() override
# File::getLocation
Get location where temporary data is stored.
- @return -
[oatpp::String](/api/latest/oatpp/core/Types/#string)
.
oatpp::String getLocation() override