eckit::FileHandle class

Base classes

class DataHandle

Public static functions

static auto classSpec() -> const ClassSpec&

Constructors, destructors, conversion operators

FileHandle(const std::string&, bool = false)
FileHandle(Stream&)
~FileHandle() override

Public functions

void advance(const Length&)
auto path() const -> const std::string&
auto openForRead() -> Length override
void openForWrite(const Length&) override
void openForAppend(const Length&) override
auto read(void*, long) -> long override
auto write(const void*, long) -> long override
void close() override
void flush() override
void rewind() override
void print(std::ostream&) const override
auto size() -> Length override
auto estimate() -> Length override
auto position() -> Offset override
auto isEmpty() const -> bool override
void restartReadFrom(const Offset& from) override
void restartWriteFrom(const Offset& from) override
void toRemote(Stream&) const override
void selectMover(MoverTransferSelection&, bool read) const override
auto title() const -> std::string override
auto metricsTag() const -> std::string override
auto moveable() const -> bool override
auto seek(const Offset&) -> Offset override
auto canSeek() const -> bool override
void skip(const Length&) override
auto clone() const -> DataHandle* override
void hash(MD5& md5) const override
void encode(Stream&) const override
auto reanimator() const -> const ReanimatorBase& override
auto saveInto(DataHandle&, TransferWatcher& = TransferWatcher::dummy()) -> Length virtual
Save into an other datahandle.
auto saveInto(const PathName&, TransferWatcher& = TransferWatcher::dummy()) -> Length virtual
Save into a file.
auto copyTo(DataHandle&, long bufsize = -1, Length maxsize = -1, TransferWatcher& = TransferWatcher::dummy()) -> Length virtual
auto name() const -> std::string virtual
auto openf(const char* mode, bool delete_on_close = false) -> FILE*
Create a FILE* from this handle.
auto openf(bool delete_on_close = false) -> FILE*
auto compare(DataHandle&) -> bool
Compare bytes.
auto compress(bool = false) -> bool virtual
auto merge(DataHandle*) -> bool virtual
void toLocal(Stream& s) const virtual
auto toLocal() -> DataHandle* virtual
void collectMetrics(const std::string& what) const virtual
auto doubleBufferOK() const -> bool virtual
auto className() const -> std::string virtual

Function documentation

Length eckit::FileHandle::saveInto(DataHandle&, TransferWatcher& = TransferWatcher::dummy()) virtual

Save into an other datahandle.

Length eckit::FileHandle::saveInto(const PathName&, TransferWatcher& = TransferWatcher::dummy()) virtual

Save into a file.

Length eckit::FileHandle::copyTo(DataHandle&, long bufsize = -1, Length maxsize = -1, TransferWatcher& = TransferWatcher::dummy()) virtual

Quiet version of saveInto Does not support progess, restart and double buffering

std::string eckit::FileHandle::name() const virtual

FILE* eckit::FileHandle::openf(const char* mode, bool delete_on_close = false)

Create a FILE* from this handle.

FILE* eckit::FileHandle::openf(bool delete_on_close = false)

bool eckit::FileHandle::compare(DataHandle&)

Compare bytes.

bool eckit::FileHandle::compress(bool = false) virtual

bool eckit::FileHandle::merge(DataHandle*) virtual

void eckit::FileHandle::toLocal(Stream& s) const virtual

DataHandle* eckit::FileHandle::toLocal() virtual

void eckit::FileHandle::collectMetrics(const std::string& what) const virtual

bool eckit::FileHandle::doubleBufferOK() const virtual

std::string eckit::FileHandle::className() const virtual