CURLOPT_POSTQUOTE.3 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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_POSTQUOTE 3 "17 Jun 2014" libcurl libcurl
  26. .SH NAME
  27. CURLOPT_POSTQUOTE \- (S)FTP commands to run after the transfer
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTQUOTE,
  32. struct curl_slist *cmds);
  33. .fi
  34. .SH DESCRIPTION
  35. Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
  36. after your FTP transfer request. The commands will only be run if no error
  37. occurred. The linked list should be a fully valid list of struct curl_slist
  38. structs properly filled in as described for \fICURLOPT_QUOTE(3)\fP.
  39. Disable this operation again by setting a NULL to this option.
  40. .SH DEFAULT
  41. NULL
  42. .SH PROTOCOLS
  43. SFTP and FTP
  44. .SH EXAMPLE
  45. .nf
  46. struct curl_slist *cmdlist = NULL;
  47. cmdlist = curl_slist_append(cmdlist, "RNFR source-name");
  48. cmdlist = curl_slist_append(cmdlist, "RNTO new-name");
  49. curl = curl_easy_init();
  50. if(curl) {
  51. curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
  52. /* pass in the FTP commands to run after the transfer */
  53. curl_easy_setopt(curl, CURLOPT_POSTQUOTE, cmdlist);
  54. ret = curl_easy_perform(curl);
  55. curl_easy_cleanup(curl);
  56. }
  57. .fi
  58. .SH AVAILABILITY
  59. If support for the protocols are built-in.
  60. .SH RETURN VALUE
  61. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  62. .SH "SEE ALSO"
  63. .BR CURLOPT_QUOTE "(3), " CURLOPT_PREQUOTE "(3), "