Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Important
This article describes the prestandard <experimental/filesystem> implementation of file_status. It documents the historical File System Technical Specification (ISO/IEC JTC 1/SC 22/WG 21 N4100), not the C++17 std::filesystem::file_status class. The experimental implementation was removed starting with MSVC version 14.51. For current code, use the standard 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: <experimental/filesystem>
Namespace: 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&&) noexcept = 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.