The options to construct the service.
Protected Readonly_The service that generates the relative paths.
Deletes a file from the file system.
The path to the file.
ProtectedgetUtility method to get the path of a file relative to the application executable.
The path to the file.
Reads a file from the file system.
The path to the file.
The text encoding in which the file should be read.
Writes a file on the file system.
The path to the file.
The contents of the file.
This service allows the application to easily work with the filesystem. The idea behind centralizing this functionalities into a service is that is pretty common to have bundling tools to generate the frontend, and on that process files can have different paths or not even be generated all. The service can be extended/overwritten to accommodate any requirements and avoid having to update or add
ifs to everyfscall the application does. Another 'feature' of this service is that all the paths are relative to the directory where the app executable is located, so you don't have to remember the relative path from the place you are accessing a file to the place where it's located.