if not file.exists (path)
{file.new (path)}
file.setType (path, 'TEXT')}
In this simple form of the if statement, we only want to execute the statements that create a new text file if the file doesn't already exist. If the call to file.exists returns true, the expression not file.exists (path) will evaluate to false, and the
indented statements will not be executed.
if file.isFolder (path)
{size = file.bytesInFolder (path)}
else
{size = file.size (path)}
This example demonstrates the use of the else clause, which enables us to take one of two possible courses of action depending on the result of a test - in this case whether we are dealing with a file or a folder.