Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Whether to only query names in directory file listing.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
(old name: CURL.SetOptionFTPListOnly)
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Value | Whether to limit directory listing to names only. | 1 |
Returns "OK" on success.
See also DIRLISTONLY option in CURL manual.
List only file names:
MBS( "CURL.SetOptionDirListOnly"; $curl; 1 )
Full listing:
MBS( "CURL.SetOptionDirListOnly"; $curl; 0 )
Query list of files in FTP/SFTP folder:
Set Variable [$curl; Value:MBS("CURL.New")]
# set download URL, e.g. sftp://monkeybreadsoftware.net/
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; SFTP Download::URL )]
# set credentials
Set Variable [$result; Value:MBS("CURL.SetOptionUserName"; $curl; SFTP Download::UserName )]
Set Variable [$result; Value:MBS("CURL.SetOptionPassword"; $curl; SFTP Download::Password )]
# login only via password
Set Variable [$result; Value:MBS( "CURL.SetOptionSSHAuthTypes"; $curl; 2+8 )]
# only get list of file/dir names
Set Variable [$result; Value:MBS("CURL.SetOptionDirListOnly"; $curl; 1)]
# run transfer
Set Field [SFTP Download::ErrorCode; MBS("CURL.Perform"; $curl)]
# check debug log for errors
Set Field [SFTP Download::Debug; MBS("CURL.GetDebugMessages"; $curl)]
Set Field [SFTP Download::FileList; MBS("CURL.GetResultAsText"; $curl)]
# free CURL session
Set Variable [$result; Value:MBS("CURL.Release"; $curl)]
Created 18th August 2014, last changed 19th December 2023
CURL.SetOptionDefaultProtocol - CURL.SetOptionDisallowUserNameInURL