check if file exists groovy 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"