fs is dir entry

This commit is contained in:
royalcat 2024-03-20 13:49:19 +03:00
parent e576e62599
commit fd3beea874
12 changed files with 172 additions and 27 deletions
src/host/vfs

View file

@ -19,6 +19,26 @@ func WrapLogFS(fs Filesystem, log *slog.Logger) *LogFS {
}
}
// Info implements Filesystem.
func (fs *LogFS) Info() (fs.FileInfo, error) {
return fs.fs.Info()
}
// IsDir implements Filesystem.
func (fs *LogFS) IsDir() bool {
return fs.fs.IsDir()
}
// Name implements Filesystem.
func (fs *LogFS) Name() string {
return fs.fs.Name()
}
// Type implements Filesystem.
func (fs *LogFS) Type() fs.FileMode {
return fs.fs.Type()
}
// Open implements Filesystem.
func (fs *LogFS) Open(filename string) (File, error) {
file, err := fs.fs.Open(filename)