2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-08-19 20:56:58 +00:00
repo/core/curl/files/CURLOPT_NETRC_FILE.3
2024-03-15 21:55:38 -05:00

46 lines
1.3 KiB
Groff

.\" generated by cd2nroff 0.1 from CURLOPT_NETRC_FILE.md
.TH CURLOPT_NETRC_FILE 3 "March 15 2024" libcurl
.SH NAME
CURLOPT_NETRC_FILE \- filename to read .netrc info from
.SH SYNOPSIS
.nf
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC_FILE, char *file);
.fi
.SH DESCRIPTION
Pass a char pointer as parameter, pointing to a null\-terminated string
containing the full path name to the \fIfile\fP you want libcurl to use as .netrc
file. If this option is omitted, and \fICURLOPT_NETRC(3)\fP is set, libcurl checks
for a .netrc file in the current user\(aqs home directory.
The application does not have to keep the string around after setting this
option.
.SH DEFAULT
NULL
.SH PROTOCOLS
All
.SH EXAMPLE
.nf
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
curl_easy_setopt(curl, CURLOPT_NETRC_FILE, "/tmp/magic-netrc");
ret = curl_easy_perform(curl);
}
}
.fi
.SH AVAILABILITY
Added in 7.10.9
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
.SH SEE ALSO
.BR CURLOPT_NETRC (3),
.BR CURLOPT_PASSWORD (3),
.BR CURLOPT_USERNAME (3)