geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

66 lines
2.3 KiB

  1. .TH libssh2_sftp_open_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
  2. .SH NAME
  3. libssh2_sftp_open - open filehandle for file on SFTP.
  4. .SH SYNOPSIS
  5. .nf
  6. #include <libssh2.h>
  7. #include <libssh2_sftp.h>
  8. LIBSSH2_SFTP_HANDLE *
  9. libssh2_sftp_open_ex(LIBSSH2_SFTP *sftp, const char *filename,
  10. unsigned int filename_len, unsigned long flags,
  11. long mode, int open_type);
  12. .SH DESCRIPTION
  13. \fIsftp\fP - SFTP instance as returned by \fIlibssh2_sftp_init(3)\fP
  14. \fIfilename\fP - Remote file/directory resource to open
  15. \fIfilename_len\fP - Length of filename
  16. \fIflags\fP - Any reasonable combination of the LIBSSH2_FXF_* constants:
  17. .RS
  18. .IP LIBSSH2_FXF_READ
  19. Open the file for reading.
  20. .IP LIBSSH2_FXF_WRITE
  21. Open the file for writing. If both this and LIBSSH2_FXF_READ are specified,
  22. the file is opened for both reading and writing.
  23. .IP LIBSSH2_FXF_APPEND
  24. Force all writes to append data at the end of the file.
  25. .IP LIBSSH2_FXF_CREAT,
  26. If this flag is specified, then a new file will be created if one does not
  27. already exist (if LIBSSH2_FXF_TRUNC is specified, the new file will be
  28. truncated to zero length if it previously exists)
  29. .IP LIBSSH2_FXF_TRUNC
  30. Forces an existing file with the same name to be truncated to zero length when
  31. creating a file by specifying LIBSSH2_FXF_CREAT. LIBSSH2_FXF_CREAT MUST also
  32. be specified if this flag is used.
  33. .IP LIBSSH2_FXF_EXCL
  34. Causes the request to fail if the named file already exists.
  35. LIBSSH2_FXF_CREAT MUST also be specified if this flag is used.
  36. .RE
  37. \fImode\fP - POSIX file permissions to assign if the file is being newly
  38. created. See the LIBSSH2_SFTP_S_* convenience defines in <libssh2_sftp.h>
  39. \fIopen_type\fP - Either of LIBSSH2_SFTP_OPENFILE (to open a file) or
  40. LIBSSH2_SFTP_OPENDIR (to open a directory).
  41. .SH RETURN VALUE
  42. A pointer to the newly created LIBSSH2_SFTP_HANDLE instance or NULL on
  43. failure.
  44. .SH ERRORS
  45. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
  46. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
  47. \fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
  48. \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
  49. received on the socket, or an SFTP operation caused an errorcode to be
  50. returned by the server.
  51. \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would
  52. block.
  53. .SH SEE ALSO
  54. .BR libssh2_sftp_close_handle(3)