status 实现一半

This commit is contained in:
HouXiaoxuan
2023-12-21 03:20:04 +08:00
parent ea9592d152
commit 0c154163ed
4 changed files with 65 additions and 2 deletions

View File

@@ -154,6 +154,7 @@ pub fn list_files(path: &Path) -> io::Result<Vec<PathBuf>> {
}
/// 获取相对于dir的相对路径
/// XXX 是否只能用在windows是否检查dir是否是path的父目录
pub fn get_relative_path(path: &Path, dir: &Path) -> PathBuf {
let path = if path.is_relative() {
get_absolute_path(path)