wiki/_next/data/Ie9t5zutrXP6Of75Cb5xF/tools.swh-fuse.json
2022-07-29 15:41:17 +00:00

1 line
5.0 KiB
JSON

{"pageProps":{"metadata":{"date":"2021-07-27 21:02:05 +08:00","date_modified":"2021-07-28 00:00:24 +08:00","language":"en","source":""},"title":"swh.fuse","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A tool to interact with the Software Heritage Filesystem (SwhFS);\nyou can see "},{"type":"element","tagName":"a","properties":{"href":"/literature.allanconSoftwareHeritageFilesystem2021"},"children":[{"type":"text","value":"The Software Heritage Filesystem (SwhFS): Integrating Source Code Archival with Development"}]},{"type":"text","value":" paper for an introduction.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Some details about the tool itself...\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"It is mainly used with the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"swh fs"}]},{"type":"text","value":" subcommand.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To mount the filesystem itself, use "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"swh fs mount DIRECTORY"}]},{"type":"text","value":".\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When mounted, the directory should have the following structure:\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"swhfs\n├── archive/\n├── cache/\n├── origin/\n└── README\n"}]}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"archive/"}]},{"type":"text","value":" is the entry point for the archived repos in the library;\n the files inside there cannot be listed (e.g., "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"ls"}]},{"type":"text","value":", file managers)\n but you can access the files inside of it (e.g., text editors, file openers)\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"cache/"}]},{"type":"text","value":" contains on-disk representation of metadata\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"origin/"}]},{"type":"text","value":" is where mounting of origins with an encoded URL\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For up-to-date information, you can read the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"README"}]},{"type":"text","value":" file.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"With the complete setup, you are now ready to interact with the filesystem.\nThe point of interest here is the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"archive/"}]},{"type":"text","value":" directory which holds all of the objects in the merkle tree.\nYou can see the "},{"type":"element","tagName":"a","properties":{"href":"https://docs.softwareheritage.org/devel/swh-model/data-model.html#data-model"},"children":[{"type":"text","value":"model data"}]},{"type":"text","value":" from their documentation.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can interact with it by accessing one of the repo through their SWHID.\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-shell"]},"children":[{"type":"text","value":"ls swhfs/archive/${SWHID}\n"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The tool lazily loads the repo, saving bandwidth and disk space.\n"}]}]},"backlinks":[{"path":"/data.archives.software-heritage","title":"Software Heritage"}]},"__N_SSG":true}