Mutable File System | Lesson 6 of 11

See how CIDs change as data changes

As you learned in the Content Addressing on the Decentralized Web tutorial, CIDs (Content Identifiers) are uniquely matched to the content they represent through cryptographic hashing. Two files with identical contents have identical CIDs and two files with even the smallest difference between them have distinct CIDs. The same is true for directories. Every time you update the contents of a file or directory, its CID changes.

When your root directory was empty and you checked its status using ipfs.files.stat, you saw this result:

{
  "cid": CID("QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"),
  "size": 0,
  "cumulativeSize": 4,
  "blocks": 0,
  "type": "directory",
  "withLocality": false
}

What might it look like now that you've added one or more files to it? Which fields should now have changed?

Try it!

Run files.stat to check the status of your root directory ( / ) again now that you've added one or more files. Be sure to return your result.

Step 1: Upload files
Step 2: Update code
View SolutionReplace with SolutionClear Default Code
Upload file(s) and update the code to complete the challenge.
You must upload a file before submitting.