Skip to content

insensatestone/afero-opfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()
}