SysTutorials

Linux Manual Pages › Section 3

stdfilesystemdirectory_entry(3)

std::filesystem::directory_entry - std::filesystem::directory_entry

Synopsis

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.

Member functions

                     constructs a directory entry constructor (public member function)                      default destructor destructor (public member function)

Modifiers

                     assigns contents operator= (public member function)                      assigns contents assign (public member function)                      sets the filename replace_filename (public member function)                      updates the cached file attributes refresh (public member function)

Observers

                     returns the path the entry refers to path (public member function) operator_const_path&                      checks whether directory entry refers to existing file system object exists (public member function)                      checks whether the directory entry refers to block device is_block_file (public member function)                      checks whether the directory entry refers to a character device is_character_file (public member function)                      checks whether the directory entry refers to a directory is_directory (public member function)                      checks whether the directory entry refers to a named pipe is_fifo (public member function)                      checks whether the directory entry refers to an other file is_other (public member function)                      checks whether the directory entry refers to a regular file is_regular_file (public member function)                      checks whether the directory entry refers to a named IPC socket is_socket (public member function)                      checks whether the directory entry refers to a symbolic link is_symlink (public member function)                      returns the size of the file to which the directory entry refers file_size (public member function)                      returns the number of hard links referring to the file to which the directory entry refers hard_link_count (public member function)                      gets or sets the time of the last data modification of the file to which the directory entry refers last_write_time (public member function)                      status of the file designated by this directory entry status symlink_status of the file designated by this directory entry symlink_status (public member function)

operator== operator!= compares two directory entries operator< (public member function) operator<= operator> operator>=