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 {
7 class DirShard : public DagNode {
8  std::uint64_t const fanout_;
9 
10  ResolveResult resolve(ResolutionState&) override;
11  DirShard* as_hamt() override;
12 
13  std::vector<std::string> hexhash(std::string_view path_element) const;
14  using HashIter = std::vector<std::string>::const_iterator;
15  ResolveResult resolve_internal(HashIter,
16  HashIter,
17  std::string_view,
19  std::size_t hex_width() const;
20  std::string listing_json() const;
21 
22  public:
25  explicit DirShard(std::uint64_t fanout = 256UL);
26  ~DirShard() noexcept override;
27 };
28 } // namespace ipfs::ipld
29 
30 #endif // IPFS_DIRECTORY_SHARD_H_
A block, an IPNS record, etc.
Definition: dag_node.h:69
Definition: directory_shard.h:7
DirShard(std::uint64_t fanout=256UL)
Definition: resolution_state.h:21