To see the OS-dependent characters used for formatting filenames (here, when running on Windows):
Instances of File are immutable representations of objects in the file system, that may or may not exist. To see different formats of a filename (here, when running within D:\Groovy\Scripts directory):
None of the above example's files were created. Files are only created by some event:
To perform general file manipulation in a file system, we can retrieve all the topmost directories:
To create a temporary file, with given prefix (of at least 3 chars) and suffix:
We can read and write to files in various ways, as in this example: