Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
/ go-mfs Public archive

An in memory model of a mutable IPFS filesystem

License

Notifications You must be signed in to change notification settings

ipfs/go-mfs

Repository files navigation

go-mfs

go-mfs implements an in-memory model of a mutable IPFS filesystem.

standard-readme compliant GoDoc Build Status

❗ This repo is no longer maintained.

👉 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.

⚠️ If you continue using this repo, please note that security fixes will not be provided (unless someone steps in to maintain it).

📚 Learn more, including how to take the maintainership mantle or ask questions, here.

Table of Contents

Install

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.

Usage

import "github.com/ipfs/go-mfs"

Check the GoDoc documentation

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:

Repository Structure

This repository contains many files, all belonging to the root mfs package.

  • file.go: MFS File.
  • dir.go: MFS Directory.
  • fd.go: FileDescriptor used to operate on Files.
  • ops.go: Functions that do not belong to either File nor Directory (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: MFS Root (a Directory with republishing support).
  • repub.go: Republisher.
  • mfs_test.go: General tests (needs a revision).
  • repub_test.go: Republisher-specific tests (contains only the TestRepublisher function).

License

MIT © Protocol Labs, Inc.