pub trait PathFileType {
// Required methods
fn filetype(&self) -> Result<FileType>;
fn is_symlink(&self) -> bool;
fn is_char_device(&self) -> bool;
fn is_block_device(&self) -> bool;
fn is_fifo(&self) -> bool;
fn is_socket(&self) -> bool;
}
Required Methods§
Sourcefn is_symlink(&self) -> bool
fn is_symlink(&self) -> bool
判断路径是否为一个链接
Sourcefn is_char_device(&self) -> bool
fn is_char_device(&self) -> bool
判断路径是否为字符设备文件
Sourcefn is_block_device(&self) -> bool
fn is_block_device(&self) -> bool
判断路径是否为块设备文件