mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
20 lines
292 B
Go
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
|
|
}
|