36 if ((read || write) && fd >= 0 && file_spec) {
64 if (fd >= 0 && dup_fd >= 0) {
85 stream.
Printf(
"open fd %d with '%s', OFLAGS = 0x%x",
m_fd,
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
bool Duplicate(int fd, int dup_fd)
void Dump(Stream &stream) const
llvm::StringRef GetPath() const
const FileSpec & GetFileSpec() const
bool Open(int fd, const FileSpec &file_spec, bool read, bool write)
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
void Clear()
Clears the object state.
ConstString GetPathAsConstString(bool denormalize=true) const
Get the full path as a ConstString.
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
A class that represents a running process on the host machine.