29 Input/output library [input.output]

29.11 File systems [filesystems]

29.11.9 Class file_­status [fs.class.file.status]

29.11.9.1 General [fs.class.file.status.general]

namespace std::filesystem { class file_status { public: // [fs.file.status.cons], constructors and destructor file_status() noexcept : file_status(file_type::none) {} explicit file_status(file_type ft, perms prms = perms::unknown) noexcept; file_status(const file_status&) noexcept = default; file_status(file_status&&) noexcept = default; ~file_status(); // assignments file_status& operator=(const file_status&) noexcept = default; file_status& operator=(file_status&&) noexcept = default; // [fs.file.status.mods], modifiers void type(file_type ft) noexcept; void permissions(perms prms) noexcept; // [fs.file.status.obs], observers file_type type() const noexcept; perms permissions() const noexcept; friend bool operator==(const file_status& lhs, const file_status& rhs) noexcept { return lhs.type() == rhs.type() && lhs.permissions() == rhs.permissions(); } }; }
An object of type file_­status stores information about the type and permissions of a file.

29.11.9.2 Constructors [fs.file.status.cons]

explicit file_status(file_type ft, perms prms = perms::unknown) noexcept;
Postconditions: type() == ft and permissions() == prms.

29.11.9.3 Observers [fs.file.status.obs]

file_type type() const noexcept;
Returns: The value of type() specified by the postconditions of the most recent call to a constructor, operator=, or type(file_­type) function.
perms permissions() const noexcept;
Returns: The value of permissions() specified by the postconditions of the most recent call to a constructor, operator=, or permissions(perms) function.

29.11.9.4 Modifiers [fs.file.status.mods]

void type(file_type ft) noexcept;
Postconditions: type() == ft.
void permissions(perms prms) noexcept;
Postconditions: permissions() == prms.