@@ -100,19 +100,6 @@ dotnet build
100100### Creating a virtual file system, add some files and print the content of the root directory as an ASCII tree
101101
102102``` csharp
103- IVirtualFileSystem vfs = new VFS ()
104- .CreateFile (" dir1/file1.txt" )
105- .CreateFile (" dir1/file2.txt" )
106- .CreateFile (" dir1/file3.txt" )
107- .CreateFile (" dir2/file1.txt" )
108- .CreateFile (" dir2/file2.txt" )
109- .CreateFile (" dir2/file3.txt" )
110- .CreateFile (" dir3/file1.txt" )
111- .CreateFile (" dir3/file2.txt" )
112- .CreateFile (" dir3/file3.txt" );
113-
114- string tree = vfs .ToString ();
115-
116103// sample output (the order of the files is alphabetical)
117104string expected = """
118105 vfs://
@@ -129,6 +116,22 @@ string expected = """
129116 ├── metropolis.txt
130117 └── themyscira.txt
131118 """ ;
119+
120+ // create a virtual file system
121+ IVirtualFileSystem vfs = new VFS ()
122+ // add some files (directories are created automatically)
123+ .CreateFile (" superheroes/batman.txt" )
124+ .CreateFile (" superheroes/superman.txt" )
125+ .CreateFile (" superheroes/wonderwoman.txt" )
126+ .CreateFile (" villains/joker.txt" )
127+ .CreateFile (" villains/lexluthor.txt" )
128+ .CreateFile (" villains/penguin.txt" )
129+ .CreateFile (" world/gotham.txt" )
130+ .CreateFile (" world/metropolis.txt" )
131+ .CreateFile (" world/themyscira.txt" );
132+
133+ // get the string representation of the virtual file system
134+ string tree = vfs .ToString ();
132135```
133136
134137## Documentation
0 commit comments