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 every fs call
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.
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
if
s to everyfs
call 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.