If you can structure your code so that the classes which contain this file system code can take a construct-only property saying which path to access, which defaults to the hardcoded one, then you can instantiate those classes with a test directory when running the code in a unit test.