#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) |
bool | isOpen () 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 | isAbsolute (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 | ) |
void File::close | ( | ) |
Referenced by ChunkFile::close(), close(), LasFile::close(), ExportFileFormatCsv::close(), create(), open(), operator=(), read(), sort(), write(), and ~File().
|
private |
Referenced by create().
void File::create | ( | const std::string & | path | ) |
Referenced by LasFile::create().
|
static |
Referenced by Editor::close().
bool File::eof | ( | ) | const |
Referenced by ChunkFile::eof().
|
static |
Referenced by ExportFileFormatLas::create(), move(), open(), remove(), resolvePath(), and ExportFileDialog::slotAccept().
|
static |
Referenced by Editor::open(), and ExportFileDialog::writer().
|
static |
Referenced by Dataset::setPath().
|
static |
Referenced by resolvePath().
|
inline |
Referenced by ExportFileFormatCsv::isOpen(), and ExportFileFormatLas::isOpen().
|
static |
Referenced by Editor::close().
|
static |
Referenced by IndexFileBuilder::stateEnd(), and Json::write().
uint64_t File::offset | ( | ) | const |
Referenced by ChunkFile::offset(), IndexFileBuilder::openFiles(), read(), seek(), and write().
void File::open | ( | const std::string & | path | ) |
void File::open | ( | const std::string & | path, |
const std::string & | mode | ||
) |
const std::string & File::path | ( | ) | const |
Referenced by create(), currentPath(), exists(), fileExtension(), fileName(), isAbsolute(), open(), ChunkFile::path(), read(), LasFile::readHeader(), remove(), replaceExtension(), replaceFileName(), resolvePath(), sort(), tmpname(), and write().
|
static |
|
staticprivate |
|
static |
void File::read | ( | uint8_t * | buffer, |
uint64_t | nbyte | ||
) |
Referenced by Json::read(), read(), PageData::read(), ChunkFile::read(), LasFile::readHeader(), LasFile::readPoint(), sort(), IndexFileBuilder::stateCopy(), IndexFileBuilder::stateCopyPoints(), IndexFileBuilder::stateMainInsert(), IndexFileBuilder::stateMainSort(), IndexFileBuilder::stateNodeInsert(), and write().
|
static |
Referenced by ExportFileFormatLas::create(), move(), and IndexFileBuilder::stateEnd().
|
static |
Referenced by IndexFileBuilder::extension().
|
static |
Referenced by resolvePath().
|
static |
Referenced by Dataset::setPath().
|
staticprivate |
void File::seek | ( | uint64_t | offset | ) |
Referenced by read(), ChunkFile::seek(), seek(), LasFile::seek(), LasFile::seekExtendedVlr(), LasFile::seekHeader(), LasFile::seekPointData(), LasFile::seekVlr(), skip(), and write().
uint64_t File::size | ( | ) | const |
Referenced by IndexFileBuilder::openFiles(), read(), LasFile::readHeader(), ChunkFile::size(), and sort().
void File::skip | ( | uint64_t | nbyte | ) |
Referenced by ChunkFile::skip().
|
static |
|
static |
|
static |
Referenced by IndexFileBuilder::start(), IndexFileBuilder::stateMove(), tmpname(), and Json::write().
|
static |
void File::write | ( | const std::string & | str | ) |
|
static |
void File::write | ( | const uint8_t * | buffer, |
uint64_t | nbyte | ||
) |
Referenced by ExportFileFormatCsv::create(), LoggerFile::println(), MessageLogWindow::slotPrintln(), sort(), IndexFileBuilder::stateCopy(), IndexFileBuilder::stateCopyPoints(), IndexFileBuilder::stateMainSort(), IndexFileBuilder::stateNodeInsert(), Json::write(), write(), ChunkFile::write(), PageData::write(), ExportFileFormatCsv::write(), LasFile::writeHeader(), and LasFile::writePoint().
void File::write | ( | File & | input, |
uint64_t | nbyte | ||
) |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
|
private |