Answers for "groovy check if file exists by name pattern"

1

groovy check if file exists

def filePath = "/tmp/file.json"

def file = new File(filePath)

assert file.exists() : "file not found"
Posted by: Guest on January-26-2021

Code answers related to "groovy check if file exists by name pattern"

Browse Popular Code Answers by Language