mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-16 11:09:33 +02:00
7c5a8a73bc
Since we need it at several places (next use case will be step xsDeploy) we should have a helper for that.
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()
|
|
}
|