Open the file at the specified path according to the given policies.
Synopses
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);
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);
Return Value
a valid FileDescriptor on success, or k_INVALID_FD otherwise
Parameters
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 |
Created with MrDocs