Open the file at the specified path according to the given policies.
Declared in <bdls_filesystemutil.h>
Open the file at the specified path according to the given policies.
static
FileDescriptor
open(
char const* path,
FileOpenPolicy openPolicy,
FileIOPolicy ioPolicy,
FileTruncatePolicy truncatePolicy = e_KEEP);
» more...
Open the file at the specified path according to the given policies.
template<class STRING_TYPE>
static
FilesystemUtil::FileDescriptor
open(
STRING_TYPE const& path,
FileOpenPolicy openPolicy,
FileIOPolicy ioPolicy,
FileTruncatePolicy truncatePolicy = e_KEEP);
» more...
a valid FileDescriptor on success, or k_INVALID_FD otherwise
| Name | Description |
|---|---|
| path | filesystem path of the file to open |
| openPolicy | whether to open an existing file or create a new one |
| ioPolicy | whether the file is opened for reading, writing, or both |
| truncatePolicy | whether to delete existing contents on open |