diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2020-04-14 01:31:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 01:31:46 -0400 |
commit | b266c1a943c3aee2d3aea05141fb2f21f9ea168b (patch) | |
tree | 99eecfeb2b63f34dc1b3d279264eca49d9b16043 /include/fs.h | |
parent | f04a13fd4b7c665dfecdeaef82e2ab628d6f402d (diff) | |
parent | 9dca29e8cc93aef68f638a06c19f4165dfc32e3d (diff) | |
download | spmc-b266c1a943c3aee2d3aea05141fb2f21f9ea168b.tar.gz |
Merge pull request #23 from jhunkeler/touch-fslist
Add functions w/ tests
Diffstat (limited to 'include/fs.h')
-rw-r--r-- | include/fs.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/fs.h b/include/fs.h index c12fe83..796c350 100644 --- a/include/fs.h +++ b/include/fs.h @@ -18,9 +18,18 @@ typedef struct { size_t files_length; } FSTree; +typedef struct { + char *root; + struct dirent **record; + size_t records; + size_t _num_alloc; +} FSList; + int _fstree_compare(const FTSENT **a, const FTSENT **b); -void fstree_free(FSTree *fsdata); FSTree *fstree(const char *_path, char **filter_by, unsigned int filter_mode); +void fstree_free(FSTree *fsdata); +FSList *fslist(const char *path); +void fslist_free(FSList *fsdata); int exists(const char *filename); int rmdirs(const char *_path); long int get_file_size(const char *filename); @@ -31,6 +40,7 @@ int rsync(const char *_args, const char *_source, const char *_destination); char *human_readable_size(uint64_t n); char *expandpath(const char *_path); char *spm_mkdtemp(const char *name, const char *extended_path); +int touch(const char *path); #endif //SPM_FSTREE_H |