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)
- 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 e836c0d66..e7ba02ad6 100644
--- a/sftp-client.h
+++ b/sftp-client.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-client.h,v 1.2 2001/03/07 10:11:23 djm Exp $ */ 1/* $OpenBSD: sftp-client.h,v 1.3 2001/03/13 22:42:54 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Damien Miller. All rights reserved. 4 * Copyright (c) 2001 Damien Miller. All rights reserved.
@@ -26,6 +26,14 @@
26 26
27/* Client side of SSH2 filexfer protocol */ 27/* Client side of SSH2 filexfer protocol */
28 28
29typedef struct SFTP_DIRENT SFTP_DIRENT;
30
31struct SFTP_DIRENT {
32 char *filename;
33 char *longname;
34 Attrib a;
35};
36
29/* 37/*
30 * Initialiase a SSH filexfer connection. Returns -1 on error or 38 * Initialiase a SSH filexfer connection. Returns -1 on error or
31 * protocol version on success. 39 * protocol version on success.
@@ -38,6 +46,12 @@ int do_close(int fd_in, int fd_out, char *handle, u_int handle_len);
38/* List contents of directory 'path' to stdout */ 46/* List contents of directory 'path' to stdout */
39int do_ls(int fd_in, int fd_out, char *path); 47int do_ls(int fd_in, int fd_out, char *path);
40 48
49/* Read contents of 'path' to NULL-terminated array 'dir' */
50int do_readdir(int fd_in, int fd_out, char *path, SFTP_DIRENT ***dir);
51
52/* Frees a NULL-terminated array of SFTP_DIRENTs (eg. from do_readdir) */
53void free_sftp_dirents(SFTP_DIRENT **s);
54
41/* Delete file 'path' */ 55/* Delete file 'path' */
42int do_rm(int fd_in, int fd_out, char *path); 56int do_rm(int fd_in, int fd_out, char *path);
43 57