summaryrefslogtreecommitdiff
path: root/src/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.h')
-rw-r--r--src/file.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/file.h b/src/file.h
index 7c5168d..d6a8681 100644
--- a/src/file.h
+++ b/src/file.h
@@ -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_ */