fn file_or_dir_name(file: &Path) -> Result<String, IoError> {
    Ok(file
        .file_name()
        .ok_or(IoError::new(ErrorKind::Other, "Filename no valid os string"))?
        .to_str()
        .ok_or(IoError::new(ErrorKind::Other, "Filename is no valid utf-8"))?
        .to_string())
}
/// Determines wheter the file is a file or directory
Determines wheter the file is a file or directory
Determines wheter the file is a file or directory
fn file_or_dir_name(file: &Path) -> Result<String, IoError> {
    Ok(file
        .file_name()
        .ok_or(IoError::new(ErrorKind::Other, "Filename no valid os string"))?
        .to_str()
        .ok_or(IoError::new(ErrorKind::Other, "Filename is no valid utf-8"))?
        .to_string())
}
fn file_or_dir_name ( file : & Path ) -> Result < String , IoError > { Ok ( file . file_name ( ) . ok_or ( IoError :: new ( ErrorKind :: Other , " " ) ) ? . to_str ( ) . ok_or ( IoError :: new ( ErrorKind :: Other , " " ) ) ? . to_string ( ) ) }
Determines wheter the file is a file or directory
Determines wheter the file is a file or directory
file
&Path
file
&Path