nginx_ui/nginx-ui-dev/internal/helper/file.go

21 lines
292 B
Go
Raw Permalink Normal View History

2025-03-04 19:28:12 +08:00
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
}