diff options
author | Ryo Nakamura <upa@haeena.net> | 2022-10-16 22:12:03 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2022-10-16 22:12:03 +0900 |
commit | def9cfeba74357ca98fc25469d4285139ecd42ce (patch) | |
tree | 077c5de04728a1342392d37d95c3c0a7fbe455a3 /src/file.h | |
parent | 579629dea21dbbb26cc9c42c4f1f1022c7270144 (diff) |
implement fill_file
Diffstat (limited to 'src/file.h')
-rw-r--r-- | src/file.h | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -1,14 +1,15 @@ #ifndef _FILE_H_ #define _FILE_H_ -struct path { - char *path; - bool remote; -}; +#include <libssh/libssh.h> +#include <libssh/sftp.h> +#include <list.h> struct file { - struct path src; /* copy source */ - struct path dst; /* copy desitnation */ + struct list_head list; /* sscp->file_list */ + + char *path; + bool remote; size_t size; /* size of this file */ }; @@ -18,11 +19,14 @@ struct chunk { size_t len; /* length of this chunk */ }; -struct file *file_expand(char **src_array, char *dst) -{ - /* return array of files expanded from sources and dst */ - return NULL; -} +char *file_find_hostname(char *path); +bool file_has_hostname(char *path); +int file_is_directory(char *path, sftp_session sftp); + +int file_fill(sftp_session sftp, struct list_head *head, char **src_array, int count); +#ifdef DEBUG +void file_dump(struct list_head *head); +#endif #endif /* _FILE_H_ */ |