Simulating file system operations in C++