This repository has been archived by the owner. It is now read-only.
How does ipfs find the names of files? #163
Labels
Comments
|
The base component of everything in IPFS is the "Block". and the block basically can be a list of names to hashes, or a list sub blocks and a blob. ~ $ ipfs object get QmSszskauNW84RVSjuKwKhi1uv8xkgDG2dUiaWEZaMM21S | jq
{
"Links": [
{
"Name": "README.md",
"Hash": "Qmbs8nJ2pDFUXbrxKgQdok5F3j46CeQ6H3SKiSqShzhtkE",
"Size": 167
},
{
"Name": "assets",
"Hash": "QmY9hi4p7hhZWQ1KmkcUdurXTuZewRxs7SPZfEuAm92nfg",
"Size": 2085821
},
{
"Name": "index.html",
"Hash": "QmZV31M1TXgVZYEGEYotbU24BnEm4QL627cGpMcUGGFPCH",
"Size": 95193
},
{
"Name": "mapbox-gl.css",
"Hash": "QmXYv8fM2khaFR7HRAaipPQgvHpJQJ6xqRrLEeMnRQdQn6",
"Size": 6404
},
{
"Name": "mapbox-gl.js",
"Hash": "QmeWwLgpujVtj6wpwKcfQZuq5gUdWwnFTc4NPkeyVi9Vo9",
"Size": 322137
},
{
"Name": "mapbox-gl.js.map",
"Hash": "QmTvQQjBd3HUi65hyFdeejCLvEMD5TZsUSsEk3ZchdaRHn",
"Size": 1139693
}
],
"Data": "\b\u0001"
}
~ $ ipfs object get QmTAJnMHpMLL8GF3WZjEAoMWo2eLDscBxBvCuLU3zCCZhp | jq
{
"Links": [
{
"Name": "",
"Hash": "QmPEEQPsErRnPhXr4Zst5P2Zfmstcxxm59iNjDzz2dhYqy",
"Size": 45623854
},
{
"Name": "",
"Hash": "QmWAoGsvLQTPH54uqx3H3kGFHJ99GdztygNLKiCKsZ5T6U",
"Size": 6796349
}
],
"Data": "\b\u0002\u0018���\u0018 ���\u0015 �۞\u0003"
}so Readme.md is addressed in two ways in IPFS. Indirectly through this directory Block. ~ $ ipfs cat QmSszskauNW84RVSjuKwKhi1uv8xkgDG2dUiaWEZaMM21S/README.md
# OSM vector tiles on IPFS
...or directly through its hash. ~ $ ipfs cat Qmbs8nJ2pDFUXbrxKgQdok5F3j46CeQ6H3SKiSqShzhtkE
# OSM vector tiles on IPFS
... |
|
Okay, really good answer |
|
Only note: there is difference between objects and blocks, blocks are uninterpreted blobs ( |
Closed
|
This issue was moved to https://discuss.ipfs.io/t/how-does-ipfs-find-the-names-of-files/437 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
kevinsimper commentedAug 18, 2016
•
edited
If you hash a directory, then the files inside that hash can be pointed at with their original name? How is that possible, because each file can still be addressed individually by their hash.
The text was updated successfully, but these errors were encountered: