summaryrefslogtreecommitdiff
path: root/sftp-client.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-03-14 10:27:09 +1100
committerDamien Miller <djm@mindrot.org>2001-03-14 10:27:09 +1100
commit4870afd7c73a605778794378915eab0c26e8c353 (patch)
tree76d93d5002452636a8884c83ba0aba2f6c0a3f58 /sftp-client.h
parent056ddf7af3504a688c34f2daf50bcd20abfef3ba (diff)
downloadopenssh-git-4870afd7c73a605778794378915eab0c26e8c353.tar.gz
- djm@cvs.openbsd.org 2001/03/13 22:42:54
[sftp-client.c sftp-client.h sftp-glob.c sftp-glob.h sftp-int.c] sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@
Diffstat (limited to 'sftp-client.h')
-rw-r--r--sftp-client.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sftp-client.h b/sftp-client.h
index e836c0d6..e7ba02ad 100644
--- a/sftp-client.h
+++ b/sftp-client.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.h,v 1.2 2001/03/07 10:11:23 djm Exp $ */
+/* $OpenBSD: sftp-client.h,v 1.3 2001/03/13 22:42:54 djm Exp $ */
/*
* Copyright (c) 2001 Damien Miller. All rights reserved.
@@ -26,6 +26,14 @@
/* Client side of SSH2 filexfer protocol */
+typedef struct SFTP_DIRENT SFTP_DIRENT;
+
+struct SFTP_DIRENT {
+ char *filename;
+ char *longname;
+ Attrib a;
+};
+
/*
* Initialiase a SSH filexfer connection. Returns -1 on error or
* protocol version on success.
@@ -38,6 +46,12 @@ int do_close(int fd_in, int fd_out, char *handle, u_int handle_len);
/* List contents of directory 'path' to stdout */
int do_ls(int fd_in, int fd_out, char *path);
+/* Read contents of 'path' to NULL-terminated array 'dir' */
+int do_readdir(int fd_in, int fd_out, char *path, SFTP_DIRENT ***dir);
+
+/* Frees a NULL-terminated array of SFTP_DIRENTs (eg. from do_readdir) */
+void free_sftp_dirents(SFTP_DIRENT **s);
+
/* Delete file 'path' */
int do_rm(int fd_in, int fd_out, char *path);