Supporting Functions
Understand the supporting functions in C++17 filesystem library to perform file type queries, manage files and directories, and handle file timestamps. Learn to check file attributes, manipulate file permissions, and use practical examples to effectively work with the filesystem in modern C++ programming.
We'll cover the following...
We'll cover the following...
So far we covered three elements of the filesystem: the path class, directory_entry and directory iterators. The library also provides a set of non-member functions.
Query functions
| function | description |
|---|---|
filesystem::is_block_file() |
checks whether the given path refers to block device |
filesystem::is_character_file() |
checks whether the given path refers to a character device |
filesystem::is_directory() |
checks whether the given path refers to a directory |
filesystem::is_empty() |
checks whether the given path refers to an empty file or directory |
filesystem::is_fifo() |
checks whether the given path refers to a named pipe |
filesystem::is_other() |
checks whether the argument refers to another file |
filesystem::is_regular_file() |
checks whether the argument refers to a regular file |
filesystem::is_socket() |
checks whether the argument refers to a named IPC socket |
filesystem::is_symlink() |
checks whether |