@@ -15,6 +15,7 @@ type FS struct {
1515}
1616
1717// Create returns a file system that prefixes all paths and forwards to root.
18+ // Note: This is equivalent to the os.DirFS(prefix) call.
1819func Create (root vfs.Filesystem , prefix string ) * FS {
1920 return & FS {Filesystem : root , Prefix : prefix }
2021}
@@ -37,6 +38,10 @@ func (fs *FS) Remove(name string) error {
3738 return fs .Filesystem .Remove (fs .PrefixPath (name ))
3839}
3940
41+ func (fs * FS ) RemoveAll (path string ) error {
42+ return fs .Filesystem .RemoveAll (fs .PrefixPath (path ))
43+ }
44+
4045// Rename implements vfs.Filesystem.
4146func (fs * FS ) Rename (oldpath , newpath string ) error {
4247 return fs .Filesystem .Rename (fs .PrefixPath (oldpath ), fs .PrefixPath (newpath ))
@@ -47,6 +52,10 @@ func (fs *FS) Mkdir(name string, perm os.FileMode) error {
4752 return fs .Filesystem .Mkdir (fs .PrefixPath (name ), perm )
4853}
4954
55+ func (fs * FS ) MkdirAll (path string , perm os.FileMode ) error {
56+ return fs .Filesystem .MkdirAll (fs .PrefixPath (path ), perm )
57+ }
58+
5059// Symlink implements vfs.Filesystem.
5160func (fs * FS ) Symlink (oldname , newname string ) error {
5261 return fs .Filesystem .Symlink (fs .PrefixPath (oldname ), fs .PrefixPath (newname ))
0 commit comments