mirrord
mirrord copied to clipboard
Path mapping
Users would like to be able to specify a mapping m
so that when an application tries to read file A
mirrord switches the path so that the app then reads the path it is mapped to, m(A)
~, locally~ (update: we want to be able to map to remote paths as well, so mapping should happen first, and then the rest of the configuration applies to the new path).
This is for cases when a user wants to provide a local file for the app to read but the path can't be written to locally (e.g. /run/secrets
on macOS).
Currently the user has to change the path in their code in order to read the local file instead of the remote one.
In the specific case motivating this issue reading the file locally is a workaround for a file read being too slow.
Another case - we'd like to redirect access to
/Users/gggg/Library/Caches/JetBrains/IntelliJIdea2024.1/tomcat/da1daf1f-07f2-4d5c-9d89-5369d7723912/conf/context.xml
to /usr/lol/ppserverApps/ggg/conf/context.xml
while the guid can change as well
https://github.com/fancy-regex/fancy-regex/blob/main/tests/replace.rs