A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/fs.class.directory_entry below:

[fs.class.directory_entry]

30.10.31.1 directory_­entry constructors [fs.dir.entry.cons]

explicit directory_entry(const path& p); directory_entry(const path& p, error_code& ec);

Effects: Constructs an object of type directory_­entry, then refresh() or refresh(ec), respectively.

Postconditions: path() == p if no error occurs, otherwise path() == std​::​filesystem​::​path().

30.10.31.2 directory_­entry modifiers [fs.dir.entry.mods]

void assign(const path& p); void assign(const path& p, error_code& ec);

Effects: Equivalent to pathobject = p, then refresh() or refresh(ec), respectively. If an error occurs, the values of any cached attributes are unspecified.

void replace_filename(const path& p); void replace_filename(const path& p, error_code& ec);

Effects: Equivalent to pathobject.replace_­filename(p), then refresh() or refresh(ec), respectively. If an error occurs, the values of any cached attributes are unspecified.

Throws: As specified in [fs.err.report].

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

Effects: Stores the current values of any cached attributes of the file p resolves to. If an error occurs, an error is reported ([fs.err.report]) and the values of any cached attributes are unspecified.

[Note: Implementations of directory_­iterator ([fs.class.directory_iterator]) are prohibited from directly or indirectly calling the refresh function since it must access the external file system, and the objective of caching is to avoid unnecessary file system accesses. end note]

30.10.31.3 directory_­entry observers [fs.dir.entry.obs]

Unqualified function names in the Returns: elements of the directory_­entry observers described below refer to members of the std​::​filesystem namespace.

const path& path() const noexcept; operator const path&() const noexcept;

bool exists() const; bool exists(error_code& ec) const noexcept;

Returns: exists(this->status()) or exists(this->status(), ec), respectively.

bool is_block_file() const; bool is_block_file(error_code& ec) const noexcept;

Returns: is_­block_­file(this->status()) or is_­block_­file(this->status(), ec), respectively.

bool is_character_file() const; bool is_character_file(error_code& ec) const noexcept;

Returns: is_­character_­file(this->status()) or is_­character_­file(this->status(), ec), respectively.

bool is_directory() const; bool is_directory(error_code& ec) const noexcept;

Returns: is_­directory(this->status()) or is_­directory(this->status(), ec), respectively.

bool is_fifo() const; bool is_fifo(error_code& ec) const noexcept;

Returns: is_­fifo(this->status()) or is_­fifo(this->status(), ec), respectively.

bool is_other() const; bool is_other(error_code& ec) const noexcept;

Returns: is_­other(this->status()) or is_­other(this->status(), ec), respectively.

bool is_regular_file() const; bool is_regular_file(error_code& ec) const noexcept;

Returns: is_­regular_­file(this->status()) or is_­regular_­file(this->status(), ec), respectively.

bool is_socket() const; bool is_socket(error_code& ec) const noexcept;

Returns: is_­socket(this->status()) or is_­socket(this->status(), ec), respectively.

bool is_symlink() const; bool is_symlink(error_code& ec) const noexcept;

Returns: is_­symlink(this->symlink_­status()) or is_­symlink(this->symlink_­status(), ec), respectively.

uintmax_t file_size() const; uintmax_t file_size(error_code& ec) const noexcept;

Returns: If cached, the file size attribute value. Otherwise, file_­size(path()) or file_­size(path(), ec), respectively.

uintmax_t hard_link_count() const; uintmax_t hard_link_count(error_code& ec) const noexcept;

Returns: If cached, the hard link count attribute value. Otherwise, hard_­link_­count(path()) or hard_­link_­count(path(), ec), respectively.

file_time_type last_write_time() const; file_time_type last_write_time(error_code& ec) const noexcept;

Returns: If cached, the last write time attribute value. Otherwise, last_­write_­time(path()) or last_­write_­time(path(), ec), respectively.

file_status status() const; file_status status(error_code& ec) const noexcept;

Returns: If cached, the status attribute value. Otherwise, status(path()) or status(path(), ec), respectively.

file_status symlink_status() const; file_status symlink_status(error_code& ec) const noexcept;

Returns: If cached, the symlink status attribute value. Otherwise, symlink_­status(path()) or symlink_­status(path(), ec), respectively.

bool operator==(const directory_entry& rhs) const noexcept;

Returns: pathobject == rhs.pathobject.

bool operator!=(const directory_entry& rhs) const noexcept;

Returns: pathobject != rhs.pathobject.

bool operator< (const directory_entry& rhs) const noexcept;

Returns: pathobject < rhs.pathobject.

bool operator<=(const directory_entry& rhs) const noexcept;

Returns: pathobject <= rhs.pathobject.

bool operator> (const directory_entry& rhs) const noexcept;

Returns: pathobject > rhs.pathobject.

bool operator>=(const directory_entry& rhs) const noexcept;

Returns: pathobject >= rhs.pathobject.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4