Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 692 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 692 Bytes

opfs Backend for Afero

About

It provides an afero filesystem implementation of an opfs backend.

This was created to provide a backend when used in wasm.

I'm very opened to any improvement through issues or pull-request that might lead to a better implementation or even better testing.

TO DO

How to use

import(
	"github.com/insensatestone/afero-opfs/pkg"
)

func main() {
  opfs,_ := opfs.NewFs()

  // And do your thing
  file, _ := fs.OpenFile("file.txt", os.O_WRONLY, 0777)
  file.WriteString("Hello world !")
  file.Close()
}