Skip to content

Commit a7588da

Browse files
committed
Update README.md
1 parent c26f696 commit a7588da

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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+
910
IFileSystemPtr 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

1617
root_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
2023
It's often useful to have several mounted filesystems. For example:
@@ -33,7 +36,7 @@ root_fs->Initialize();
3336
zip_fs->Initialize();
3437
mem_fs->Initialize();
3538
36-
auto vfs = vfs_get_global();
39+
VirtualFileSystemPtr vfs(new VirtualFileSystem());
3740
vfs->AddFileSystem("/", std::move(root_fs));
3841
vfs->AddFileSystem("/resources", std::move(zip_fs));
3942
vfs->AddFileSystem("/tmp", std::move(mem_fs));

0 commit comments

Comments
 (0)