4#include "../Strings/StringView.h"
5#include "FileDescriptor.h"
Additional flags to be set when opening files.
Definition: File.h:36
bool blocking
Set to false if file will be used for Async I/O (see Async)
Definition: File.h:38
bool inheritable
Set to true to make the file visible to child processes.
Definition: File.h:37
File Descriptor (use SC::File to open and use it with strings and containers).
Definition: FileDescriptor.h:52
Wraps a SC::FileDescriptor to open it and use strings / containers.
Definition: File.h:20
Result readUntilEOF(String &destination)
Reads into a given string until End of File (EOF) is signaled It works also for non-seekable file des...
Result open(StringView path, OpenMode mode, OpenOptions options)
Opens file at path with a given mode
OpenMode
Define mode for opening the file (read, write etc.)
Definition: File.h:27
@ ReadAndWrite
Opens file for read / write mode.
Definition: File.h:31
@ WriteAppend
Opens write mode, appending to existing file that must exist at the same location.
Definition: File.h:30
@ WriteCreateTruncate
Opens in write mode, creating or truncating it if another file exists at same location.
Definition: File.h:29
@ ReadOnly
Opens in read-only mode.
Definition: File.h:28
Result readUntilEOF(Vector< uint8_t > &destination)
Reads into a given dynamic buffer until End of File (EOF) is signaled.
Result open(StringView path, OpenMode mode)
Opens file at path with a given mode
Result readUntilEOF(Vector< char > &destination)
Reads into a given dynamic buffer until End of File (EOF) is signaled.
An ascii string used as boolean result. SC_TRY macro forwards errors to caller.
Definition: Result.h:12
A non-modifiable owning string with associated encoding.
Definition: String.h:30
Non-owning view over a range of characters with UTF Encoding.
Definition: StringView.h:47
A contiguous sequence of heap allocated elements.
Definition: Vector.h:51