https://github.com/ipfs/go-mfs
An in memory model of a mutable IPFS filesystem
https://github.com/ipfs/go-mfs
Last synced: 9 months ago
JSON representation
An in memory model of a mutable IPFS filesystem
- Host: GitHub
- URL: https://github.com/ipfs/go-mfs
- Owner: ipfs
- License: mit
- Archived: true
- Created: 2018-08-20T11:52:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-06-26T14:03:05.000Z (almost 3 years ago)
- Last Synced: 2024-09-13T17:14:35.620Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 378 KB
- Stars: 46
- Watchers: 27
- Forks: 26
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# go-mfs
> go-mfs implements an in-memory model of a mutable IPFS filesystem.
[](http://ipn.io)
[](http://ipfs.io/)
[](https://github.com/RichardLitt/standard-readme)
[](https://godoc.org/github.com/ipfs/go-mfs)
[](https://travis-ci.com/ipfs/go-mfs)
## ❗ 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](https://github.com/ipfs/boxo#migrating-to-boxo) 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](https://github.com/ipfs/boxo/wiki/Copied-or-Migrated-Repos-FAQ).
## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [License](#license)
## Install
`go-mfs` works like a regular Go module:
```
> go get github.com/ipfs/go-mfs
```
It uses [Gx](https://github.com/whyrusleeping/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](https://godoc.org/github.com/ipfs/go-mfs)
## 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:
* [UnixFS](https://docs.ipfs.io/guides/concepts/unixfs/)
* [MFS](https://docs.ipfs.io/guides/concepts/mfs/)
* [General concept document about how are files handled in IPFS (WIP)](https://github.com/ipfs/docs/issues/133)
## 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 `File`s.
* `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](https://github.com/ipfs/go-mfs/issues/9)).
* `repub_test.go`: Republisher-specific tests (contains only the `TestRepublisher` function).
## License
MIT © Protocol Labs, Inc.