Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiverse OS Logo

Multiverse: memfs Library

URL multiverse-os.org

A pure-go dependency free memory filesystem (memfs) that abstracts a file system ontop of go datatypes and allows developers to interact through an API modeled after the Go File standard library.

Development plans include mounting the memory file system so it is accessible and visible from terminal and provide easy hooking of functionality on write/read and other operations for further layers of abstraction.

Usage

package main

import(
    "fmt"
    "os"

    "github.com/multiverse-os/memfs"
)

func main() {
    fs, err := memfs.NewFS()
    if err != nil {
      panic(err)
      }

    // Opens a file with read/write permissions in the current directory
    f, _ := fs.Create("/example.txt")

    f.Write([]byte("Hello, world!"))
    f.Close()

    fs.Remove("example.txt")
}

About

A pure Go memory file system with only std-library based dependencies that provides Go software with access to an abstracted memory filesystem

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages