nginx-ui/internal/helper/file.go
2024-10-26 10:40:06 +08:00

20 lines
292 B
Go

package helper
import "os"
func FileExists(filepath string) bool {
_, err := os.Stat(filepath)
if os.IsNotExist(err) {
return false
}
return true
}
func SymbolLinkExists(filepath string) bool {
_, err := os.Lstat(filepath)
if os.IsNotExist(err) {
return false
}
return true
}