pkg/environment: Migrate fs functions to fsx

This commit is contained in:
Tom Wiesing 2023-03-02 11:38:30 +01:00
parent 45540ab253
commit 5a43ecfaeb
No known key found for this signature in database
21 changed files with 155 additions and 199 deletions

View file

@ -1,25 +1,3 @@
package environment
import (
"io"
"io/fs"
)
// Environment represents an environment that a program can run it.
// It mostly mimics the interfaces of the [os] package.
type Environment interface {
isEnv()
Create(path string, mode fs.FileMode) (WritableFile, error)
Mkdir(path string, mode fs.FileMode) error
MkdirAll(path string, mode fs.FileMode) error
}
type WritableFile interface {
fs.File
io.Writer
}
func init() {
var _ Environment = new(Native)
}
type Environment struct{}