9#ifndef LLDB_HOST_WINDOWS_FILEWINDOWS_H
10#define LLDB_HOST_WINDOWS_FILEWINDOWS_H
33 Status Read(
void *dst,
size_t &num_bytes, off_t &offset)
override;
34 Status Write(
const void *src,
size_t &num_bytes, off_t &offset)
override;
37 bool isA(
const void *classID)
const override {
45 int Fileno(FILE *fh)
const override;
46 int Dup(
int fd)
const override;
static llvm::raw_ostream & error(Stream &strm)
An abstract base class for files.
virtual bool isA(const void *classID) const
lldb::file_t WaitableHandle
Status Write(const void *buf, size_t &num_bytes) override
Write bytes from buf to a file at the current file position.
bool isA(const void *classID) const override
Status Read(void *buf, size_t &num_bytes) override
Read bytes from a file from the current file position into buf.
const NativeFileWindows & operator=(const NativeFileWindows &)=delete
int Fileno(FILE *fh) const override
Map a stream to its underlying file descriptor.
Status Sync() override
Sync to disk.
void CalculateInteractiveAndTerminal() override
Refresh the cached interactive / terminal / color flags by inspecting the underlying descriptor.
bool TryWriteStreamUnlocked(const void *buf, size_t &num_bytes, Status &error) override
Hook for stream writes that bypass the default fwrite path.
NativeFileWindows(const NativeFileWindows &)=delete
static bool classof(const File *file)
NativeFileWindows()=default
Status Write(const void *src, size_t &num_bytes, off_t &offset) override
Write bytes to a file at the specified file offset.
WaitableHandle GetWaitableHandle() override
Get a handle that can be used for OS polling interfaces, such as WaitForMultipleObjects,...
bool isA(const void *classID) const override
Status Read(void *dst, size_t &num_bytes, off_t &offset) override
Read bytes from a file from the specified file offset.
bool m_is_windows_console
Set when this file wraps stdin/stdout/stderr connected to a console; triggers the raw_fd_ostream path...
int Dup(int fd) const override
Duplicate a file descriptor.
A class that represents a running process on the host machine.