c-ipfs/include/ipfs/importer/importer.h
jmjatlanta 7fa0fc6a7b Added a simplistic command line.
From the command line, you can init the repository or add a file.
Directories coming soon...
2016-12-21 08:08:44 -05:00

22 lines
612 B
C

#ifndef __IPFS_IMPORTER_IMPORTER_H__
#define __IPFS_IMPORTER_IMPORTER_H__
#include "ipfs/merkledag/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);
/**
* called from the command line
* @param argc the number of arguments
* @param argv the arguments
*/
int ipfs_import(int argc, char** argv);
#endif /* INCLUDE_IPFS_IMPORTER_IMPORTER_H_ */