groovy if file does not exist code example
Example: groovy check if file exists
def filePath = "/tmp/file.json"
def file = new File(filePath)
assert file.exists() : "file not found"
def filePath = "/tmp/file.json"
def file = new File(filePath)
assert file.exists() : "file not found"