ipfs-chromium
directory_shard.h
1 #ifndef IPFS_DIRECTORY_SHARD_H_
2 #define IPFS_DIRECTORY_SHARD_H_ 1
3 
4 #include <ipfs_client/ipld/dag_node.h>
5 
6 namespace ipfs::ipld {
9 class DirShard : public DagNode {
10  std::uint64_t const fanout_;
11 
12  ResolveResult resolve(ResolutionState&) override;
13  DirShard* as_hamt() override;
14 
15  std::vector<std::string> hexhash(std::string_view path_element) const;
16  using HashIter = std::vector<std::string>::const_iterator;
17  ResolveResult resolve_internal(HashIter,
18  HashIter,
19  std::string_view,
21  std::size_t hex_width() const;
22  std::string listing_json() const;
23 
24  public:
28  explicit DirShard(std::uint64_t fanout = 256UL);
29  ~DirShard() noexcept override;
30 };
31 } // namespace ipfs::ipld
32 
33 #endif // IPFS_DIRECTORY_SHARD_H_
A block, an IPNS record, etc.
Definition: dag_node.h:69
Definition: directory_shard.h:9
DirShard(std::uint64_t fanout=256UL)
Definition: resolution_state.h:21