Added a simplistic command line.

From the command line, you can init the repository or add a file.
Directories coming soon...
This commit is contained in:
jmjatlanta 2016-12-21 08:08:44 -05:00
parent f8cdaf0a97
commit 7fa0fc6a7b
11 changed files with 246 additions and 35 deletions

View file

@ -12,4 +12,11 @@
*/
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_ */

17
include/ipfs/repo/init.h Normal file
View file

@ -0,0 +1,17 @@
#pragma once
/***
* Makes a new ipfs repository
* @param path the path to the repository, should end
* with .ipfs, and the directory should already exist.
* @returns true(1) on success
*/
int make_ipfs_repository(const char* path);
/**
* Initialize a repository, called from the command line
* @param argc number of arguments
* @param argv arguments
* @returns true(1) on success
*/
int ipfs_repo_init(int argc, char** argv);