go-mfs implements an in-memory model of a mutable IPFS filesystem.
👉 We highly recommend switching to the maintained version at https://github.com/ipfs/boxo/tree/main/mfs. 🏎️ Good news! There is tooling and documentation to expedite a switch in your repo.
📚 Learn more, including how to take the maintainership mantle or ask questions, here.
go-mfs works like a regular Go module:
> go get github.com/ipfs/go-mfs
It uses Gx to manage dependencies. You can use make all to build it with the gx dependencies.
import "github.com/ipfs/go-mfs"
Check the GoDoc documentation
Documentation around the MFS and the Files API in general around IPFS is a work in progress the following links may be of use:
This repository contains many files, all belonging to the root mfs package.
file.go: MFSFile.dir.go: MFSDirectory.fd.go:FileDescriptorused to operate onFiles.ops.go: Functions that do not belong to eitherFilenorDirectory(although they mostly operate on them) that contain common operations to the MFS, e.g., find, move, add a file, make a directory.root.go: MFSRoot(aDirectorywith republishing support).repub.go:Republisher.mfs_test.go: General tests (needs a revision).repub_test.go: Republisher-specific tests (contains only theTestRepublisherfunction).
MIT © Protocol Labs, Inc.