Open the file at the specified path according to the given policies.
Synopsis
Declared in <bdls_filesystemutil.h>
template<class STRING_TYPE>
static
FilesystemUtil::FileDescriptor
open(
STRING_TYPE const& path,
FileOpenPolicy openPolicy,
FileIOPolicy ioPolicy,
FileTruncatePolicy truncatePolicy = e_KEEP);
Description
Same as the overload taking const char *.
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