# Trait ```rust pub trait DFile { fn new + Display>(path: P) -> Self; fn name(&self) -> &str; fn full_name(&self) -> &str; fn is_exist(&self) -> bool; fn is_read_only(&self) -> bool; fn create_self(&self) -> io::Result<()>; fn delete_self(&self) -> io::Result<()>; fn rename + Display>(&mut self, new_name: N) -> io::Result<()>; fn move_with_new_name + Display>(&mut self, path: P) -> io::Result<()>; fn move_to + Display>(&mut self, path: P) -> io::Result<()>; fn copy_with_new_name + Display>(&mut self, path: P) -> io::Result<()>; fn copy_to + Display>(&mut self, path: P) -> io::Result<()>; fn size_bytes(&self) -> io::Result; fn size_kb(&self) -> io::Result; fn size_mb(&self) -> io::Result; fn to_dfile(&self) -> Dfile; fn get_parent(&self) -> DirectoryInfo; fn get_parent_path(&self) -> String; fn add_path + Display>(&mut self, path: P); } ``` # Struct ```rust pub struct DF; pub struct FileInfo; pub struct DirectoryInfo; pub struct Dfile; ``` # Enum ```rust pub enum DFtype; ``` # Usage ```rust use file_system::*; fn main() { let dir = DirectoryInfo::new("directory_path"); let file = FileInfo::new("file_path"); let dfile = Dfile::new("dir_or_file_path"); } ```