fs.go 364 B

12345678910111213141516171819202122
  1. // Copyright 2021 Ross Light
  2. // SPDX-License-Identifier: ISC
  3. // +build !go1.16
  4. package fs
  5. import (
  6. "os"
  7. )
  8. // FS is a copy of Go 1.16's io/fs.FS interface.
  9. type FS interface {
  10. Open(name string) (File, error)
  11. }
  12. // File is a copy of Go 1.16's io/fs.File interface.
  13. type File interface {
  14. Stat() (os.FileInfo, error)
  15. Read([]byte) (int, error)
  16. Close() error
  17. }