17 #ifndef COM_BORA_SOFTWARE__BALAU_RESOURCE__FILE_BYTE_READ_RESOURCE 18 #define COM_BORA_SOFTWARE__BALAU_RESOURCE__FILE_BYTE_READ_RESOURCE 22 #include <boost/filesystem.hpp> 41 : file(std::move(rhs.file))
42 , stream(std::move(rhs.stream)) {}
52 public:
const Uri &
uri()
const override;
67 private: std::unique_ptr<File> file;
68 private: std::unique_ptr<boost::filesystem::ifstream> stream;
73 #endif // COM_BORA_SOFTWARE__BALAU_RESOURCE__FILE_BYTE_READ_RESOURCE const File & getFile() const
Get the file URI.
A read-only resource which is read as bytes.
Definition: ByteReadResource.hpp:29
std::istream & readStream() override
Get the input stream of the byte read resource.
Definition: FileByteReadResource.hpp:48
void close() override
Close the stream(s) in the resource.
Definition: FileByteReadResource.hpp:61
An abstract universal resource identifier.
Definition: Uri.hpp:131
The unified resource class hierarchy.
Definition: ByteReadResource.hpp:24
A read-only standard file on a file system which is read as bytes.
Definition: FileByteReadResource.hpp:32
const Uri & uri() const override
Get the URI associated with this resource.
A file on the local file system.
Definition: File.hpp:35
FileByteReadResource(const File &file_)
Create a new file byte read resource from the supplied file URI.
A read-only resource which is read as bytes.