Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CURL.SetOptionFileTime

Whether to query file time.

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

Parameters

Parameter Description Example
curl The CURL session handle. $curl
Value Whether to query file time. 1

Result

Returns "OK" on success.

Description

Whether to query file time.
Pass a number. If it is 1, libcurl will attempt to get the modification date of the remote document in this operation. This requires that the remote server sends the time or replies to a time querying command. The CURL.GetFileTime function can be used after a transfer to extract the received time (if any).

See also FILETIME option in CURL manual.

Examples

Try getting the file time:

Set Variable [ $curl ; Value: MBS("CURL.New") ]
# put in some URL
Set Variable [ $r ; Value: MBS("CURL.SetOptionURL"; $curl; "https://www.monkeybreadsoftware.com/filemaker/examples/test.txt") ]
# Only check if file exists, but don't download it
Set Variable [ $result ; Value: MBS("CURL.SetOptionNoBody"; $curl; 1) ]
# Request to read file time
Set Variable [ $r ; Value: MBS("CURL.SetOptionFileTime"; $curl; 1) ]
# perform request
Set Variable [ $result ; Value: MBS("CURL.Perform"; $curl) ]
#
# check result
Set Field [ CURL Test::Debug Messages ; Value: MBS("CURL.GetDebugMessages"; $curl) ]
# check response code: 200 if file exists or 404 if not found
Set Variable [ $responseCode ; Value: MBS("CURL.GetResponseCode"; $curl) ]
# and get the time value
Set Variable [ $time ; Value: MBS("CURL.GetFileTime"; $curl) ]
# cleanup
Set Variable [ $result ; Value: MBS("CURL.Release"; $curl) ]

See also

Example Databases

Created 18th August 2014, last changed 24th February 2026


CURL.SetOptionFileOnlyMode - CURL.SetOptionFollowLocation