There are two concepts in IPFS, the connection of which is not very clear to me: IPFS pin and IPFS MFS.
As I understand it, ipfs pin
allows you to keep content on your node, protecting it from being automatically removed by the garbage collector. In this case, if I add content by myself using ipfs add <file>
, then it will be automatically pinned and then it can be unpinned and removed only manually.
IPFS MFS, on the other hand, allows objects to be manipulated as if they were in the file system. For example, I can copy a specific external object to MFS using ipfs files cp <id> <name>
. After that, I can find out its ID using ipfs files stat <name>
.
The questions are:
- Are the files in MFS protected from being removed by garbage collector?
- If protected, then why are they not displayed in
ipfs pin ls
? - Will the data be saved if I add it using
ipfs add <file>
, then add it to MFS usingipfs files cp <id> <name>
, and then unpin it usingipfs pin rm <id>
? - Is IPFS MFS a more reliable way to work with data?