I'm writing a program that creates and edits directories and files in a file system.
I want to write a test that does things like
(1) check if the given directory exists and
(2) create a directory within the existing directory.
What is the best way to test functionality like this?
Is there a way to fake a file system (e.g. in memory?) or would I have to just use a temporary output directory that creates/checks real directories?