mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-05 15:15:44 +02:00
15 lines
195 B
Go
15 lines
195 B
Go
|
package piperutils
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
// FileExists ...
|
||
|
func FileExists(filename string) bool {
|
||
|
info, err := os.Stat(filename)
|
||
|
if os.IsNotExist(err) {
|
||
|
return false
|
||
|
}
|
||
|
return !info.IsDir()
|
||
|
}
|