From 4870afd7c73a605778794378915eab0c26e8c353 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 14 Mar 2001 10:27:09 +1100 Subject: - 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@ --- sftp-client.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sftp-client.h') 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 @@ -/* $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); -- cgit v1.2.3