在线文档教程
C++
文件系统 | Filesystem

std::filesystem::file_type

文件系统::file[医]类型

Defined in header
enum class file_type { none = /* unspecified */, not_found = /* unspecified */, regular = /* unspecified */, directory = /* unspecified */, symlink = /* unspecified */, block = /* unspecified */, character = /* unspecified */, fifo = /* unspecified */, socket = /* unspecified */, unknown = /* unspecified */, /* implementation-defined */ };(since C++17)

指示路径引用的文件或目录的类型。

常数

ConstantMeaning
noneindicates that the file status has not been evaluated yet, or an error occurred when evaluating it
not_foundindicates that the file was not found (this is not considered an error)
regulara regular file
directorya directory
symlinka symbolic link
blocka block special file
charactera character special file
fifoa FIFO (also known as pipe) file
socketa socket file
implementation-definedan additional implementation-defined constant for each additional file type supported by the implementation
unknownthe file exists but its type could not be determined

另见

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppremience.com/w/cpp/filesystem/file[医]类型