5#include <source_location>
14 template <
typename Fn>
15 concept SyscallInvocable = std::is_invocable_r_v<
int, Fn>;
23
24
25
28
29
30
31
32 explicit FileDescriptor(
const std::filesystem::path& path,
int flags = O_RDONLY);
35
36
37
38
39
58 int get()
const noexcept;
63 void cleanup()
const noexcept;
RAII file descriptor wrapper.
Definition file_descriptor.h:19
FileDescriptor(int fd)
Wrap existing descriptor.
FileDescriptor(const FileDescriptor &)=delete
FileDescriptor & operator=(FileDescriptor &&other) noexcept
FileDescriptor(FileDescriptor &&other) noexcept
FileDescriptor & operator=(const FileDescriptor &)=delete
FileDescriptor(const std::filesystem::path &path, int flags=O_RDONLY)
Attempt to get descriptor via open()
Definition file_descriptor.h:11