File Utilities

File Utilities

Throughout the Flood toolkit, operator overrides have been implemented for folders and files to simplify the process of defining file paths. These overrides provide a more intuitive and readable syntax, making it easier to work with directories and files.

Instead of using the traditional approach of concatenating strings to create file paths, such as:

File('${myDirectory.path}/config/settings.json')

You can now use the following syntax:

myDirectory / 'config' - 'settings.json'

The / operator is used to navigate through directories, while the - operator is used to specify a file within a directory.