Directory hashes match

This commit is contained in:
jmjatlanta 2016-12-29 04:42:01 -05:00
parent fa3dd77e96
commit 396dfc6abc
6 changed files with 74 additions and 19 deletions

View file

@ -10,7 +10,7 @@
* @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);
int ipfs_import_file(const char* root, const char* fileName, struct Node** node, struct FSRepo* fs_repo, size_t* bytes_written);
/**
* called from the command line

View file

@ -16,10 +16,30 @@ struct FileList {
struct FileList* next;
};
/**
* Builds a list of files within a directory
* @param path the path to examine
* @returns a FileList struct of the first file
*/
struct FileList* os_utils_list_directory(const char* path);
// frees memory used by creating a FileList linked list
/**
* Cleans up memory used by a FileList struct
* @param first the struct to free
* @returns true(1)
*/
int os_utils_free_file_list(struct FileList* first);
/**
* Split the filename from the path
* @param in the full path and filename
* @param path only the path part
* @param filename only the file name
* @returns true(1)
*/
int os_utils_split_filename(const char* in, char** path, char** filename);
/**
* get an environment varible from the os
* @param variable the variable to look for