chore(fs): changes to allow Filesystem to be implemented externally (#10040)

### Purpose

The `fs.Filesystem` interface contains two parts that cannot be
implemented externally because they are private:

* `filesystemWrapperType`: this PR changes `unwrapFilesystem` to
downcast to a specific concrete type
* `underlying`: this PR simply moves it to an unexported interface

### Testing

Regular tests pass.
This commit is contained in:
Tommy van der Vorst
2025-04-08 12:39:39 +00:00
committed by GitHub
parent d7ca483df1
commit d23cd197e1
11 changed files with 33 additions and 69 deletions
-4
View File
@@ -336,10 +336,6 @@ func (*BasicFilesystem) underlying() (Filesystem, bool) {
return nil, false
}
func (*BasicFilesystem) wrapperType() filesystemWrapperType {
return filesystemWrapperTypeNone
}
// basicFile implements the fs.File interface on top of an os.File
type basicFile struct {
*os.File