mirror of
https://github.com/upa/mscp.git
synced 2026-02-14 09:14:47 +08:00
implement fill_file
This commit is contained in:
26
src/file.h
26
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_ */
|
||||
|
||||
Reference in New Issue
Block a user