use crate::posish::fs::file_path_by_ttyname_or_seaching;
use posish::fs::getpath;
use std::{fs, path::PathBuf};
pub(crate) fn file_path(file: &fs::File) -> Option<PathBuf> {
if let Ok(path) = getpath(file) {
return Some(path);
}
file_path_by_ttyname_or_seaching(file)
}