feat: 增加创建软链接文件功能

This commit is contained in:
zhengkunwang223
2022-08-31 16:00:51 +08:00
parent 245f5fb68a
commit 1b0660f4a3
9 changed files with 98 additions and 27 deletions

View File

@@ -34,3 +34,11 @@ func GetMimeType(path string) string {
}
return mime.String()
}
func GetSymlink(path string) string {
linkPath, err := os.Readlink(path)
if err != nil {
return ""
}
return linkPath
}