mirror of
https://github.com/matrix-construct/construct
synced 2025-04-09 03:13:11 +02:00
ircd::fs: Doc comments for fd::opts.
This commit is contained in:
parent
45155d5e4d
commit
f8e4f4675f
1 changed files with 13 additions and 0 deletions
|
@ -44,13 +44,26 @@ struct ircd::fs::fd
|
||||||
|
|
||||||
struct ircd::fs::fd::opts
|
struct ircd::fs::fd::opts
|
||||||
{
|
{
|
||||||
|
/// open(2) flags. Usually generated from ios::open_mode ctor.
|
||||||
ulong flags {0};
|
ulong flags {0};
|
||||||
|
|
||||||
|
/// open(2) mode_t mode used for file creation.
|
||||||
ulong mask {0};
|
ulong mask {0};
|
||||||
|
|
||||||
|
/// Seek to end after open. This exists to convey the flag for open_mode.
|
||||||
bool ate {false};
|
bool ate {false};
|
||||||
|
|
||||||
|
/// (O_DIRECT) Direct IO bypassing the operating system caches.
|
||||||
bool direct {false};
|
bool direct {false};
|
||||||
|
|
||||||
|
/// (O_CLOEXEC) Close this descriptor on an exec().
|
||||||
bool cloexec {true};
|
bool cloexec {true};
|
||||||
|
|
||||||
|
/// Prevents file from being created if it doesn't exist. This clears
|
||||||
|
/// any implied O_CREAT from the open_mode ctor and in flags too.
|
||||||
bool nocreate {false};
|
bool nocreate {false};
|
||||||
|
|
||||||
|
/// Construct options from an std::ios::open_mode bitmask.
|
||||||
opts(const std::ios::open_mode &);
|
opts(const std::ios::open_mode &);
|
||||||
opts() = default;
|
opts() = default;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue