2016-12-15 17:38:08 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/**
|
|
|
|
* get a file by its hash, and write the data to a file
|
|
|
|
* @param hash the base58 multihash of the cid
|
|
|
|
* @param file_name the file name to write to
|
|
|
|
* @returns true(1) on success
|
|
|
|
*/
|
|
|
|
int ipfs_exporter_to_file(const unsigned char* hash, const char* file_name, const struct FSRepo* fs_repo);
|
2016-12-22 15:21:18 +00:00
|
|
|
|
|
|
|
int ipfs_exporter_object_get(int argc, char** argv);
|
|
|
|
|
2016-12-23 17:53:03 +00:00
|
|
|
/***
|
|
|
|
* Called from the command line with ipfs cat [hash]. Retrieves the object pointed to by hash, and displays its block data (links and data elements)
|
|
|
|
* @param argc number of arguments
|
|
|
|
* @param argv arguments
|
|
|
|
* @returns true(1) on success
|
|
|
|
*/
|
|
|
|
int ipfs_exporter_object_cat(int argc, char** argv);
|