15std::string readLine(
int fd);
20void writeLine(
int fd, std::string s);
25std::string readFile(
int fd);
31void readFull(
int fd,
char * buf,
size_t count);
32void writeFull(
int fd, std::string_view s,
bool allowInterrupts =
true);
37std::string drainFD(
int fd,
bool block =
true,
const size_t reserveSize=0);
46std::string guessOrInventPathFromFD(
int fd);
55 explicit AutoCloseFD(
int fd);
56 AutoCloseFD(
const AutoCloseFD & fd) =
delete;
57 AutoCloseFD(AutoCloseFD&& fd);
59 AutoCloseFD& operator =(
const AutoCloseFD & fd) =
delete;
60 AutoCloseFD& operator =(AutoCloseFD&& fd)
noexcept(
false);
69 std::string guessOrInventPath()
const {
return guessOrInventPathFromFD(fd); }
71 explicit operator bool()
const;
75 void reset() { *
this = {}; }
95void closeOnExec(
int fd);
97MakeError(EndOfFile, Error);
Definition file-descriptor.hh:51
Definition file-descriptor.hh:79
This file defines two main structs/classes used in nix error handling.
Definition generator.hh:236
Definition serialise.hh:18
Definition serialise.hh:66