From Jason Turner

[fs.class.file.status]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpd_n_1je0/{from.md → to.md} +72 -0
tmp/tmpd_n_1je0/{from.md → to.md} RENAMED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Class `file_status` <a id="fs.class.file.status">[[fs.class.file.status]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::filesystem {
5
+ class file_status {
6
+ public:
7
+ // [fs.file.status.cons], constructors and destructor
8
+ file_status() noexcept : file_status(file_type::none) {}
9
+ explicit file_status(file_type ft,
10
+ perms prms = perms::unknown) noexcept;
11
+ file_status(const file_status&) noexcept = default;
12
+ file_status(file_status&&) noexcept = default;
13
+ ~file_status();
14
+
15
+ // assignments
16
+ file_status& operator=(const file_status&) noexcept = default;
17
+ file_status& operator=(file_status&&) noexcept = default;
18
+
19
+ // [fs.file.status.mods], modifiers
20
+ void type(file_type ft) noexcept;
21
+ void permissions(perms prms) noexcept;
22
+
23
+ // [fs.file.status.obs], observers
24
+ file_type type() const noexcept;
25
+ perms permissions() const noexcept;
26
+
27
+ friend bool operator==(const file_status& lhs, const file_status& rhs) noexcept
28
+ { return lhs.type() == rhs.type() && lhs.permissions() == rhs.permissions(); }
29
+ };
30
+ }
31
+ ```
32
+
33
+ #### Constructors <a id="fs.file.status.cons">[[fs.file.status.cons]]</a>
34
+
35
+ ``` cpp
36
+ explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
37
+ ```
38
+
39
+ *Ensures:* `type() == ft` and `permissions() == prms`.
40
+
41
+ #### Observers <a id="fs.file.status.obs">[[fs.file.status.obs]]</a>
42
+
43
+ ``` cpp
44
+ file_type type() const noexcept;
45
+ ```
46
+
47
+ *Returns:* The value of `type()` specified by the postconditions of the
48
+ most recent call to a constructor, `operator=`, or `type(file_type)`
49
+ function.
50
+
51
+ ``` cpp
52
+ perms permissions() const noexcept;
53
+ ```
54
+
55
+ *Returns:* The value of `permissions()` specified by the postconditions
56
+ of the most recent call to a constructor, `operator=`, or
57
+ `permissions(perms)` function.
58
+
59
+ #### Modifiers <a id="fs.file.status.mods">[[fs.file.status.mods]]</a>
60
+
61
+ ``` cpp
62
+ void type(file_type ft) noexcept;
63
+ ```
64
+
65
+ *Ensures:* `type() == ft`.
66
+
67
+ ``` cpp
68
+ void permissions(perms prms) noexcept;
69
+ ```
70
+
71
+ *Ensures:* `permissions() == prms`.
72
+