mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-07-09 21:06:35 +08:00
status 实现一半
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user