std::filesystem::directory_entry::refresh

Examines the filesystem object referred to by this directory entry and stores its attributes for retrieval with status, exists, is_regular_file, and other status accessors.

# Declarations

void refresh();

(since C++17)

void refresh( std::error_code& ec ) noexcept;

(since C++17)

# Parameters

# Return value

(none)

# Notes

Many low-level OS APIs for directory traversal retrieve file attributes along with the next directory entry. The constructors and the non-const member functions of std::filesystem::directory_iterator store these attributes, if any, in the pointed-to std::filesystem::directory_entry without calling directory_entry::refresh, which makes it possible to examine the attributes of the directory entries as they are being iterated over, without making additional system calls.

# Example

This section is incompleteReason: no example

# See also