#include "util/file.hh"
#include "util/exception.hh"
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <limits>
#include <sstream>
#include <cassert>
#include <cerrno>
#include <climits>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdint.h>
#include <unistd.h>
Go to the source code of this file.
Namespaces | |
namespace | util |
Defines | |
#define | _LARGEFILE64_SOURCE |
#define | _FILE_OFFSET_BITS 64 |
Functions | |
bool | util::InputFileIsStdin (StringPiece path) |
bool | util::OutputFileIsStdout (StringPiece path) |
int | util::OpenReadOrThrow (const char *name) |
int | util::CreateOrThrow (const char *name) |
uint64_t | util::SizeFile (int fd) |
uint64_t | util::SizeOrThrow (int fd) |
void | util::ResizeOrThrow (int fd, uint64_t to) |
std::size_t | util::PartialRead (int fd, void *to, std::size_t amount) |
void | util::ReadOrThrow (int fd, void *to_void, std::size_t amount) |
std::size_t | util::ReadOrEOF (int fd, void *to_void, std::size_t amount) |
void | util::WriteOrThrow (int fd, const void *data_void, std::size_t size) |
void | util::WriteOrThrow (FILE *to, const void *data, std::size_t size) |
void | util::ErsatzPRead (int fd, void *to_void, std::size_t size, uint64_t off) |
void | util::ErsatzPWrite (int fd, const void *from_void, std::size_t size, uint64_t off) |
void | util::FSyncOrThrow (int fd) |
void | util::SeekOrThrow (int fd, uint64_t off) |
void | util::AdvanceOrThrow (int fd, int64_t off) |
void | util::SeekEnd (int fd) |
std::FILE * | util::FDOpenOrThrow (scoped_fd &file) |
std::FILE * | util::FDOpenReadOrThrow (scoped_fd &file) |
int | util::mkstemp_and_unlink (char *tmpl) |
void | util::NormalizeTempPrefix (std::string &base) |
int | util::MakeTemp (const StringPiece &base) |
std::FILE * | util::FMakeTemp (const StringPiece &base) |
int | util::DupOrThrow (int fd) |
std::string | util::NameFromFD (int fd) |