]> andersk Git - openssh.git/blobdiff - sftp-client.h
- (bal) Missed two files in major resync. auth-bsdauth.c and auth-skey.c
[openssh.git] / sftp-client.h
index 838b46b0b3af366b3725b3c9f2f946d37e7aad2b..09ffcc05cb37bd0ec813d96e2b3c148b8530647e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.h,v 1.1 2001/02/04 11:11:54 djm Exp $ */
+/* $OpenBSD: sftp-client.h,v 1.5 2001/04/05 10:42:52 markus Exp $ */
 
 /*
  * Copyright (c) 2001 Damien Miller.  All rights reserved.
 
 /* Client side of SSH2 filexfer protocol */
 
-/* Initialiase a SSH filexfer connection */
+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.
+ */
 int do_init(int fd_in, int fd_out);
 
 /* Close file referred to by 'handle' */
@@ -35,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);
 
@@ -45,14 +62,14 @@ int do_mkdir(int fd_in, int fd_out, char *path, Attrib *a);
 int do_rmdir(int fd_in, int fd_out, char *path);
 
 /* Get file attributes of 'path' (follows symlinks) */
-Attrib *do_stat(int fd_in, int fd_out, char *path);
+Attrib *do_stat(int fd_in, int fd_out, char *path, int quiet);
 
 /* Get file attributes of 'path' (does not follow symlinks) */
-Attrib *do_lstat(int fd_in, int fd_out, char *path);
+Attrib *do_lstat(int fd_in, int fd_out, char *path, int quiet);
 
 /* Get file attributes of open file 'handle' */
-Attrib *do_fstat(int fd_in, int fd_out, char *handle,
-    u_int handle_len);
+Attrib *do_fstat(int fd_in, int fd_out, char *handle, u_int handle_len,
+    int quiet);
 
 /* Set file attributes of 'path' */
 int do_setstat(int fd_in, int fd_out, char *path, Attrib *a);
@@ -67,6 +84,12 @@ char *do_realpath(int fd_in, int fd_out, char *path);
 /* Rename 'oldpath' to 'newpath' */
 int do_rename(int fd_in, int fd_out, char *oldpath, char *newpath);
 
+/* Rename 'oldpath' to 'newpath' */
+int do_symlink(int fd_in, int fd_out, char *oldpath, char *newpath);
+
+/* Return target of symlink 'path' - caller must free result */
+char *do_readlink(int fd_in, int fd_out, char *path);
+
 /* XXX: add callbacks to do_download/do_upload so we can do progress meter */
 
 /*
This page took 0.040848 seconds and 4 git commands to generate.