io/Open: add flags
parameter to OpenReadOnly()
This commit is contained in:
parent
4e88f95f94
commit
a584141cae
@ -34,10 +34,10 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
UniqueFileDescriptor
|
||||
OpenReadOnly(const char *path)
|
||||
OpenReadOnly(const char *path, int flags)
|
||||
{
|
||||
UniqueFileDescriptor fd;
|
||||
if (!fd.OpenReadOnly(path))
|
||||
if (!fd.Open(path, O_RDONLY|flags))
|
||||
throw FormatErrno("Failed to open '%s'", path);
|
||||
|
||||
return fd;
|
||||
|
@ -34,7 +34,7 @@ class FileDescriptor;
|
||||
class UniqueFileDescriptor;
|
||||
|
||||
UniqueFileDescriptor
|
||||
OpenReadOnly(const char *path);
|
||||
OpenReadOnly(const char *path, int flags=0);
|
||||
|
||||
UniqueFileDescriptor
|
||||
OpenWriteOnly(const char *path, int flags=0);
|
||||
|
Loading…
Reference in New Issue
Block a user