#include <File.hpp>
Public Member Functions | |
File () | |
~File () | |
File (const File &other) | |
File & | operator= (const File &other) |
void | create (const std::string &path) |
void | open (const std::string &path) |
void | open (const std::string &path, const std::string &mode) |
void | close () |
void | seek (uint64_t offset) |
void | skip (uint64_t nbyte) |
void | read (uint8_t *buffer, uint64_t nbyte) |
void | write (const uint8_t *buffer, uint64_t nbyte) |
void | write (const std::string &str) |
void | write (File &input, uint64_t nbyte) |
void | truncate (uint64_t newSize=0) |
bool | open () const |
bool | eof () const |
uint64_t | size () const |
uint64_t | offset () const |
const std::string & | path () const |
Static Public Member Functions | |
static std::string | join (const std::string &path1, const std::string &path2) |
static std::string | currentPath () |
static bool | exists (const std::string &path) |
static bool | absolute (const std::string &path) |
static std::string | fileName (const std::string &path) |
static std::string | fileExtension (const std::string &path) |
static std::string | replaceFileName (const std::string &path, const std::string &newFileName) |
static std::string | replaceExtension (const std::string &path, const std::string &newExtension) |
static std::string | resolvePath (const std::string &path, const std::string &basePath) |
static void | read (uint8_t *buffer, const std::string &path, uint64_t nbyte, uint64_t offset) |
static void | write (const uint8_t *buffer, const std::string &path, uint64_t nbyte, uint64_t offset) |
static std::string | read (const std::string &path) |
static void | write (const std::string &path, const std::string &data) |
static std::string | tmpname (const std::string &path) |
static std::string | tmpname (const std::string &outputPath, const std::string &inputPath) |
static void | sort (const std::string &path, size_t element_size, int(*comp)(const void *, const void *)) |
static void | move (const std::string &outputPath, const std::string &inputPath) |
static void | remove (const std::string &path) |
Private Member Functions | |
void | create () |
Static Private Member Functions | |
static int | seek (int fd, uint64_t offset) |
static int | read (int fd, uint8_t *buffer, uint64_t nbyte) |
static int | write (int fd, const uint8_t *buffer, uint64_t nbyte) |
Private Attributes | |
int | fd_ |
uint64_t | size_ |
uint64_t | offset_ |
std::string | path_ |
Static Private Attributes | |
static const int | INVALID_DESCRIPTOR = -1 |
File::File | ( | ) |
File::~File | ( | ) |
File::File | ( | const File & | other | ) |
|
static |
Referenced by resolvePath().
void File::close | ( | ) |
Referenced by ChunkFile::close(), close(), RecordFile::close(), LasFile::close(), ExportFileFormatCsv::close(), TreeTableExportCsv::close(), create(), open(), operator=(), read(), read(), sort(), write(), write(), and ~File().
|
private |
Referenced by create().
void File::create | ( | const std::string & | path | ) |
Referenced by LasFile::create(), and RecordFile::create().
|
static |
Referenced by Editor::close(), and Editor::openDataset().
bool File::eof | ( | ) | const |
Referenced by ChunkFile::eof().
|
static |
|
static |
Referenced by Editor::open(), ExportFileDialog::writer(), and TreeTableExportDialog::writer().
|
static |
Referenced by Editor::openDataset(), and Dataset::setPath().
|
static |
Referenced by Editor::close().
|
static |
Referenced by LasFile::move(), and Json::write().
uint64_t File::offset | ( | ) | const |
Referenced by RecordFile::index(), ChunkFile::offset(), LasFile::offset(), read(), RecordFile::readBuffer(), seek(), seek(), and write().
void File::open | ( | const std::string & | path | ) |
Referenced by ExportFileFormatCsv::create(), TreeTableExportCsv::create(), LoggerFile::LoggerFile(), MessageLogWindow::MessageLogWindow(), ExportFileFormatCsv::open(), TreeTableExportCsv::open(), LasFile::open(), RecordFile::open(), LasFile::open(), ChunkFile::open(), read(), MessageLogWindow::slotPrintln(), sort(), and write().
void File::open | ( | const std::string & | path, |
const std::string & | mode ) |
const std::string & File::path | ( | ) | const |
Referenced by absolute(), create(), currentPath(), exists(), fileExtension(), fileName(), open(), open(), ChunkFile::path(), read(), read(), RecordFile::readHeader(), LasFile::readHeader(), remove(), replaceExtension(), replaceFileName(), resolvePath(), RecordFile::setupRecordType(), sort(), tmpname(), write(), and write().
|
static |
|
staticprivate |
|
static |
void File::read | ( | uint8_t * | buffer, |
uint64_t | nbyte ) |
|
static |
Referenced by ExportFileFormatLas::create(), move(), and LasFile::remove().
|
static |
Referenced by IndexFileBuilder::extension(), and Editor::openDataset().
|
static |
Referenced by resolvePath().
|
static |
Referenced by Editor::openDataset(), and Dataset::setPath().
|
staticprivate |
void File::seek | ( | uint64_t | offset | ) |
uint64_t File::size | ( | ) | const |
void File::skip | ( | uint64_t | nbyte | ) |
Referenced by ChunkFile::skip().
|
static |
|
static |
|
static |
Referenced by IndexFileBuilder::start(), IndexFileBuilder::stateMove(), tmpname(), and Json::write().
void File::truncate | ( | uint64_t | newSize = 0 | ) |
|
static |
void File::write | ( | const std::string & | str | ) |
|
static |
void File::write | ( | const uint8_t * | buffer, |
uint64_t | nbyte ) |
Referenced by ExportFileFormatCsv::create(), TreeTableExportCsv::create(), RecordFile::fill(), LoggerFile::println(), MessageLogWindow::slotPrintln(), sort(), ChunkFile::write(), TreeTableExportCsv::write(), Json::write(), write(), write(), write(), ChunkFile::write(), write(), RecordFile::write(), write(), write(), ExportFileFormatCsv::write(), RecordFile::write(), RecordFile::write(), RecordFile::writeBuffer(), LasFile::writeBuffer(), LasFile::writeHeader(), RecordFile::writeHeader(), and LasFile::writePoint().
void File::write | ( | File & | input, |
uint64_t | nbyte ) |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
|
private |