Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

CURL.SetOptionFileOnlyMode

Disables collecting data for Result functions.

Component Version macOS Windows Linux Server iOS SDK
CURL 2.6 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionFileOnlyMode"; curl; Value )   More

Parameters

Parameter Description Example
curl The CURL session handle. $curl
Value Whether to write data to files only and avoid storing data in memory. 1

Result

Returns "OK" on success or error message.

Description

Disables collecting data for Result functions.
If you create file with CURL.CreateOutputFile you may want to have data only in file and avoid filling memory with data for the result functions.
Do not call this method while a transfer is running.

Examples

Write data only to file:

MBS( "CURL.SetOptionFileOnlyMode"; $curl; 1 )
MBS( "CURL.CreateOutputFile"; $curl; "/tmp/download.dat" )

Also record data in memory:

MBS( "CURL.CreateOutputFile"; $curl; "/tmp/download.dat" )
MBS( "CURL.SetOptionFileOnlyMode"; $curl; 0 )

See also

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 3th December 2021


CURL.SetOptionFailOnError - CURL.SetOptionFileTime

💬 Ask a question or report a problem