Answers for "groovy if file does not exist"

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 if file does not exist"

Browse Popular Code Answers by Language