Currently, there are lots of variables that represent the file, like $file_destination_path, $original_file_path, $source_file and all the derived variables. So when for example the destination path for a shadowed source must be calculated, it is quite complex and dirty.
The code would be much clearer if there was one object "file" with all the needed properties.
Problem is that PowerShell doesn't really support custom objects, and methods, so these must be written in other languages.
Currently, there are lots of variables that represent the file, like $file_destination_path, $original_file_path, $source_file and all the derived variables. So when for example the destination path for a shadowed source must be calculated, it is quite complex and dirty.
The code would be much clearer if there was one object "file" with all the needed properties.
Problem is that PowerShell doesn't really support custom objects, and methods, so these must be written in other languages.