aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/open.ccm
blob: eaedacdcc9371291bc26bf66e103167d2a713bb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * This source code is released into the public domain.
 */

module;

#include <expected>
#include <filesystem>

export module nihil.posix:open;

import nihil.error;
import :fd;

export namespace nihil {

/*
 * Open the given file and return an fd for it.
 */
[[nodiscard]] auto open(std::filesystem::path const &filename,
			int flags, int mode = 0777)
	-> std::expected<fd, error>;

} // namespace nihil