mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-21 03:44:17 +08:00
优化导入文档中链接处理
This commit is contained in:
@@ -151,12 +151,16 @@ func AbsolutePath(p string) (string, error) {
|
||||
}
|
||||
|
||||
// FileExists reports whether the named file or directory exists.
|
||||
func FileExists(name string) bool {
|
||||
if _, err := os.Stat(name); err != nil {
|
||||
return false
|
||||
}else{
|
||||
func FileExists(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
if err == nil {
|
||||
return true
|
||||
}
|
||||
if os.IsNotExist(err) {
|
||||
return false
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func FormatBytes(size int64) string {
|
||||
|
Reference in New Issue
Block a user