Difference between revisions of "cpp/filesystem/directory entry"
From cppreference.com
< cpp | filesystem
(Added a missing comma to the additional file attribute list.) |
Andreas Krug (Talk | contribs) m (fmt) |
||
Line 2: | Line 2: | ||
{{cpp/filesystem/directory_entry/navbar}} | {{cpp/filesystem/directory_entry/navbar}} | ||
{{dcl begin}} | {{dcl begin}} | ||
− | {{dcl header | filesystem}} | + | {{dcl header|filesystem}} |
− | {{dcl | since=c++17 | 1= | + | {{dcl|since=c++17|1= |
class directory_entry; | class directory_entry; | ||
}} | }} | ||
Line 12: | Line 12: | ||
===Member functions=== | ===Member functions=== | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc inc | cpp/filesystem/directory_entry/dsc constructor}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc constructor}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc destructor}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc destructor}} |
− | {{dsc h2 | Modifiers}}} | + | {{dsc h2|Modifiers}}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc operator{{=}}}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc operator{{=}}}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc assign}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc assign}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc replace_filename}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc replace_filename}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc refresh}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc refresh}} |
− | {{dsc h2 | Observers}} | + | {{dsc h2|Observers}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc path}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc path}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc exists}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc exists}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc is_block_file}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc is_block_file}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc is_character_file}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc is_character_file}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc is_directory}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc is_directory}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc is_fifo}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc is_fifo}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc is_other}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc is_other}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc is_regular_file}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc is_regular_file}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc is_socket}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc is_socket}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc is_symlink}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc is_symlink}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc file_size}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc file_size}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc hard_link_count}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc hard_link_count}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc last_write_time}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc last_write_time}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc status}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc status}} |
− | {{dsc inc | cpp/filesystem/directory_entry/dsc operator_cmp}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc operator_cmp}} |
{{dsc end}} | {{dsc end}} | ||
===Non-member functions=== | ===Non-member functions=== | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc inc | cpp/filesystem/directory_entry/dsc operator_ltlt}} | + | {{dsc inc|cpp/filesystem/directory_entry/dsc operator_ltlt}} |
{{dsc end}} | {{dsc end}} | ||
Latest revision as of 12:45, 3 December 2023
Defined in header <filesystem>
|
||
class directory_entry; |
(since C++17) | |
Represents a directory entry. The object stores a path
as a member and may also store additional file attributes (hard link count, status, symlink status, file size, and last write time) during directory iteration.
Contents |
[edit] Member functions
constructs a directory entry (public member function) | |
(destructor) |
default destructor (public member function) |
Modifiers | |
assigns contents (public member function) | |
assigns contents (public member function) | |
sets the filename (public member function) | |
updates the cached file attributes (public member function) | |
Observers | |
returns the path the entry refers to (public member function) | |
checks whether directory entry refers to existing file system object (public member function) | |
checks whether the directory entry refers to block device (public member function) | |
checks whether the directory entry refers to a character device (public member function) | |
checks whether the directory entry refers to a directory (public member function) | |
checks whether the directory entry refers to a named pipe (public member function) | |
checks whether the directory entry refers to an other file (public member function) | |
checks whether the directory entry refers to a regular file (public member function) | |
checks whether the directory entry refers to a named IPC socket (public member function) | |
checks whether the directory entry refers to a symbolic link (public member function) | |
returns the size of the file to which the directory entry refers (public member function) | |
returns the number of hard links referring to the file to which the directory entry refers (public member function) | |
gets the time of the last data modification of the file to which the directory entry refers (public member function) | |
status of the file designated by this directory entry; status of the file/symlink designated by this directory entry (public member function) | |
(removed in C++20)(removed in C++20)(removed in C++20)(removed in C++20)(removed in C++20)(C++20) |
compares two directory entries (public member function) |
[edit] Non-member functions
performs stream output on a directory entry (function) |
[edit] Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 3171 | C++17 | directory_entry couldn't be inserted by operator<< because of LWG2989
|
output enabled again |