I would like to implement a very simple Virtual Filesystem (VFS) which supports some basic file system operation like fwrite, fopen, fput, etc. The VFS is an abstraction lay
If you're looking for a way to abstract yourself from the properties of the filesystem you're using (path separators etc.), and if you're happy with a C++-only solution, take a look at Boost.Filesystem.
Paths can be specified in the portable generic path format (basically POSIX format) and are automatically converted to the native format:
path my_path( "some_dir/file.txt" );
Elements can be concatenated onto the path using the /
operator, and the result can then directly be used to open a file:
ifstream file1( my_path / "foo/bar" );
What's more, this functionality is part of Technical Report 2, meaning that it will likely make its way into the standard library.