ipfs-shipyard / java-ipfs-http-client

A Java implementation of the HTTP IPFS API
MIT License
538 stars 243 forks source link

API for getting a directory #154

Closed odisseus closed 4 years ago

odisseus commented 4 years ago

Is there a simple way to get a directory by its multihash and write it to the file system, similar to the way ipfs get works in the command line client?

odisseus commented 4 years ago

In case somebody else stumbles on this question: when accessed by the get endpoint of the HTTP interface, the IPFS node by default returns a TAR archive, which encloses either a file or a directory.

In fact, it seems that the node always returns an archive, even if you add &archive=false to the URI...