17 #ifndef COM_BORA_SOFTWARE__BALAU_RESOURCE__FILE_BYTE_WRITE_RESOURCE 18 #define COM_BORA_SOFTWARE__BALAU_RESOURCE__FILE_BYTE_WRITE_RESOURCE 22 #include <boost/filesystem.hpp> 39 : file(std::move(rhs.file))
40 , stream(std::move(rhs.stream)) {}
50 public:
const Uri &
uri()
const override;
65 private: std::unique_ptr<File> file;
66 private: std::unique_ptr<boost::filesystem::ofstream> stream;
71 #endif // COM_BORA_SOFTWARE__BALAU_RESOURCE__FILE_BYTE_WRITE_RESOURCE A write-only resource which is written as bytes.
An abstract universal resource identifier.
Definition: Uri.hpp:131
A write only standard file on a file system which is written as bytes.
Definition: FileByteWriteResource.hpp:32
FileByteWriteResource(const File &file_)
Create a new file byte write resource from the supplied file URI.
The unified resource class hierarchy.
Definition: ByteReadResource.hpp:24
A write-only resource which is written from bytes.
Definition: ByteWriteResource.hpp:29
const File & getFile() const
Get the file URI.
A file on the local file system.
Definition: File.hpp:35
std::ostream & writeStream() override
Get the output stream of the byte write resource.
Definition: FileByteWriteResource.hpp:46
const Uri & uri() const override
Get the URI associated with this resource.
void close() override
Close the stream(s) in the resource.
Definition: FileByteWriteResource.hpp:59