[feature] file exclude

This commit is contained in:
royalcat 2023-12-26 01:11:03 +03:00
parent 0350ecba9a
commit 0332206560
13 changed files with 243 additions and 19 deletions
src/host/vfs

View file

@ -72,6 +72,19 @@ func (r *ResolveFS) Stat(filename string) (fs.FileInfo, error) {
return r.rootFS.Stat(fsPath)
}
// Unlink implements Filesystem.
func (r *ResolveFS) Unlink(filename string) error {
fsPath, nestedFs, nestedFsPath, err := r.resolver.resolvePath(filename, r.rootFS.Open)
if err != nil {
return err
}
if nestedFs != nil {
return nestedFs.Unlink(nestedFsPath)
}
return r.rootFS.Unlink(fsPath)
}
var _ Filesystem = &ResolveFS{}
type FsFactory func(f File) (Filesystem, error)