You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/packer-plugin-sdk/acctest/testutils/utils.go

19 lines
358 B

package testutils
import "os"
// CleanupFiles removes all the provided filenames.
func CleanupFiles(moreFiles ...string) {
for _, file := range moreFiles {
os.RemoveAll(file)
}
}
// FileExists returns true if the filename is found.
func FileExists(filename string) bool {
if _, err := os.Stat(filename); err == nil {
return true
}
return false
}