[technical debt] Decouple MFS from UnixFS
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
### Checklist
- [X] This is a bug report, not a question. Ask questions on [discuss.ipfs.io](https://discuss.ipfs.io).
- [X] I have searched on the [issue tracker](https://github.com/ipfs/go-ipfs/issues?q=is%3Aissue) for my bug.
- [X] I am running the latest [go-ipfs version](https://dist.ipfs.io/#go-ipfs) or have an issue updating.
### Installation method
built from source
### Version
```Text
.
```
### Config
```json
.
```
### Description
The general theme of this issue is:
* UnixFS should impelement the File System part of the stack, i.e., mapping local filesystem files, directories, links, etc. to IPFS/IPLD DAGs.
* MFS should only implement the _mutable_ layer of this filesystem DAG (i.e., MFS only adds the M to the FS).
The concrete part of this issue, local to the `go-ipfs` implementation, is to remove the MFS from the `ipfs add` command, limiting it only to the `ipfs files` one. Achieving this will point us in the right direction regarding the general theme above.
More specifically and as a starting point, we should remove the MFS root form the the `Adder` [structure](https://github.com/ipfs/go-ipfs/blob/52a747763f6c4e85b33ca051cda9cc4b75c815f9/core/coreunix/add.go#L77). This is not the permanent MFS root used in the `ipfs files` command (stored in the repo) but just an ephemeral directory needed to support basic FS operations resulting from the unwanted coupling of UnixFS/MFS.
Contributor guide
Assessment
This issue has not been assessed yet.