File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ vfspp is a C++ Virtual File System header-only library that allows manipulation
66
77``` C++
88// Register native filesystem during development or zip for distribution build
9+
910IFileSystemPtr root_fs = nullptr ;
1011#if defined(DISTRIBUTION_BUILD)
1112 root_fs = std::make_unique<CZipFileSystem>("Resources.zip", "/");
@@ -14,7 +15,9 @@ IFileSystemPtr root_fs = nullptr;
1415#endif
1516
1617root_fs->Initialize ();
17- vfs_get_global ()->AddFileSystem("/", std::move(root_fs));
18+
19+ VirtualFileSystemPtr vfs (new VirtualFileSystem());
20+ vfs->AddFileSystem("/", std::move(root_fs));
1821```
1922
2023It's often useful to have several mounted filesystems. For example:
@@ -33,7 +36,7 @@ root_fs->Initialize();
3336zip_fs->Initialize();
3437mem_fs->Initialize();
3538
36- auto vfs = vfs_get_global( );
39+ VirtualFileSystemPtr vfs(new VirtualFileSystem() );
3740vfs->AddFileSystem("/", std::move(root_fs));
3841vfs->AddFileSystem("/resources", std::move(zip_fs));
3942vfs->AddFileSystem("/tmp", std::move(mem_fs));
You can’t perform that action at this time.
0 commit comments