1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
/// A structure representing a type of file with accessors for each file type. /// It is returned by `Metadata::file_type` method. /// /// This corresponds to [`std::fs::FileType`]. /// /// TODO: Not yet implemented. /// /// [`std::fs::FileType`]: https://doc.rust-lang.org/std/fs/struct.FileType.html #[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct FileType {} impl FileType { /// Tests whether this file type represents a directory. /// /// This corresponds to [`std::fs::FileType::is_dir`]. /// /// TODO: Not yet implemented. /// /// [`std::fs::FileType::is_dir`]: https://doc.rust-lang.org/std/fs/struct.FileType.html#method.is_dir pub fn is_dir(&self) -> bool { unimplemented!("FileType::is_dir"); } /// Tests whether this file type represents a regular file. /// /// This corresponds to [`std::fs::FileType::is_file`]. /// /// TODO: Not yet implemented. /// /// [`std::fs::FileType::is_file`]: https://doc.rust-lang.org/std/fs/struct.FileType.html#method.is_file pub fn is_file(&self) -> bool { unimplemented!("FileType::is_file"); } /// Tests whether this file type represents a symbolic link. /// /// This corresponds to [`std::fs::FileType::is_symlink`]. /// /// TODO: Not yet implemented. /// /// [`std::fs::FileType::is_symlink`]: https://doc.rust-lang.org/std/fs/struct.FileType.html#method.is_symlink pub fn is_symlink(&self) -> bool { unimplemented!("FileType::is_symlink"); } } // TODO: functions from FileTypeExt? // TODO: impl Debug for FileType