载入中...
搜索中...
未找到
File.cpp
浏览该文件的文档.
17 if (!isopen && !open("rb")) throw eve::Exception("Could not read file %s.", getFilename().c_str());
67FileData::FileData(const std::string &filename, uint64_t size) : data(nullptr), size((size_t)size), filename(filename) {
Data buffer paired with a filename (used for type identification).
Definition FileData.h:14
FileData(const std::string &filename, uint64_t size)
Allocates a buffer of the given size for the named file.
Definition File.cpp:67
virtual std::string getExtension() const
Gets the file extension for this File, or empty string if none.
Definition File.cpp:50
virtual FileData * read(int64_t size=ALL)
Reads data from the file and allocates a Data object.
Definition File.cpp:13
virtual bool write(const void *data, int64_t size)=0
Writes data into the File.
virtual std::string getFilename() const =0
Gets the filename for this File, or empty string if none.