CURLOPT_PREQUOTE.3 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .TH CURLOPT_PREQUOTE 3 "17 Jun 2014" libcurl libcurl
  26. .SH NAME
  27. CURLOPT_PREQUOTE \- commands to run before an FTP transfer
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE,
  32. struct curl_slist *cmds);
  33. .fi
  34. .SH DESCRIPTION
  35. Pass a pointer to a linked list of FTP commands to pass to the server after
  36. the transfer type is set. The linked list should be a fully valid list of
  37. struct curl_slist structs properly filled in as described for
  38. \fICURLOPT_QUOTE(3)\fP. Disable this operation again by setting a NULL to this
  39. option.
  40. These commands are not performed when a directory listing is performed, only
  41. for file transfers.
  42. While \fICURLOPT_QUOTE(3)\fP and \fICURLOPT_POSTQUOTE(3)\fP work for SFTP,
  43. this option does not.
  44. .SH DEFAULT
  45. NULL
  46. .SH PROTOCOLS
  47. FTP
  48. .SH EXAMPLE
  49. .nf
  50. struct curl_slist *cmdlist = NULL;
  51. cmdlist = curl_slist_append(cmdlist, "SYST");
  52. curl = curl_easy_init();
  53. if(curl) {
  54. curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
  55. /* pass in the FTP commands to run */
  56. curl_easy_setopt(curl, CURLOPT_PREQUOTE, cmdlist);
  57. ret = curl_easy_perform(curl);
  58. curl_easy_cleanup(curl);
  59. }
  60. .fi
  61. .SH AVAILABILITY
  62. Along with the protocol support
  63. .SH RETURN VALUE
  64. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  65. .SH "SEE ALSO"
  66. .BR CURLOPT_QUOTE "(3), " CURLOPT_POSTQUOTE "(3), "