c-ipfs/include/ipfs/importer/importer.h
jmjatlanta 033dd767b4 More work on persisting data to disk.
Blockstore now storing the data, whereas datastore is storing the key
and filename. The key should be the multihash (currently the sha256, not
the multihash), and the value is the filename (base32).
2016-12-14 12:07:43 -05:00

16 lines
458 B
C

#ifndef __IPFS_IMPORTER_IMPORTER_H__
#define __IPFS_IMPORTER_IMPORTER_H__
#include "ipfs/node/node.h"
#include "ipfs/repo/fsrepo/fs_repo.h"
/**
* Creates a node based on an incoming file
* @param file_name the file to import
* @param node the root node (could have links to others)
* @returns true(1) on success
*/
int ipfs_import_file(const char* fileName, struct Node** node, struct FSRepo* fs_repo);
#endif /* INCLUDE_IPFS_IMPORTER_IMPORTER_H_ */