finally actually writing the config file, although the peerid and private key are not included

This commit is contained in:
jmjatlanta 2016-11-02 23:05:29 -05:00
parent d30fa55af7
commit cba5d5cf20
7 changed files with 187 additions and 6 deletions

View file

@ -52,7 +52,7 @@ struct RepoConfig {
* @param result the full filename including the path
* @returns true(1) on success, false(0) otherwise
*/
int config_get_file_name(char* path, char* result);
int repo_config_get_file_name(char* path, char** result);
/***
* Returns the path "extension" relative to the configuration root.

View file

@ -5,6 +5,8 @@
#define fs_repo_h
#include <stdio.h>
#include "ipfs/repo/config/config.h"
/**
* a structure to hold the repo info
@ -32,4 +34,13 @@ int fs_repo_open(char* repo_path, struct FSRepo* repo);
*/
int fs_repo_is_initialized(char* repo_path);
/**
* write the config file to disk
* @param path the path to the file
* @param config the config structure
* @returns true(1) on success
*/
int fs_repo_write_config_file(char* path, struct RepoConfig* config);
#endif /* fs_repo_h */