file_status Class
Wraps a file_type and file perms.
Syntax
class file_status;
Constructors
Constructor | Description |
---|---|
file_status | Constructs a wrapper for file_type and file perms. |
Member functions
Member function | Description |
---|---|
type | Gets or sets the file_type . |
permissions | Gets or sets the file permissions. |
Operators
Operator | Description |
---|---|
operator= | The defaulted member assignment operators behave as expected. |
Requirements
Header: <filesystem>
Namespace: std::experimental::filesystem, std::experimental::filesystem
file_status::file_status
Constructs a wrapper for file_type and file perms.
explicit file_status(
file_type ftype = file_type::none,
perms mask = perms::unknown) noexcept;
file_status(const file_status&) noexcept = default;
file_status(file_status&&) noexcept = default;
~file_status() noexcept = default;
Parameters
ftype
Specified file_type
, defaults to file_type::none
.
mask
Specified file perms
, defaults to perms::unknown
.
file_status
The stored object.
file_status::operator=
The defaulted member assignment operators behave as expected.
file_status& operator=(const file_status&) noexcept = default;
file_status& operator=(file_status&&) nexcept = default;
Parameters
file_status
The file_status being copied into the file_status
.
type
Gets or sets the file_type
.
file_type type() const noexcept
void type(file_type ftype) noexcept
Parameters
ftype
Specified file_type
.
permissions
Gets or sets the file permissions.
Use the setter to make a file readonly
or remove the readonly
attribute.
perms permissions() const noexcept
void permissions(perms mask) noexcept
Parameters
mask
Specified perms
.