---
product: Chilkat
product_version: 11.7.0
language: tcl
language_label: Tcl
class: SFtp
license: bundle
deprecated: false
reference_html: https://www.chilkatsoft.com/refdoc/tclSFtpRef.html
---
# Chilkat SFtp — Tcl — v11.7.0

> Chilkat 11.7.0 · language=tcl · class=SFtp
> Other versions: replace `11.7.0` in this URL. Other languages: `https://www.chilkatsoft.com/ai-docs/v/11.7.0/<lang>/classes/SFtp.md`.
> Language-wide rules (install, unlock, error model, strings/bytes): `https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/guide.md`.

## Purpose

**Transfer, list, manage, and synchronize files over SFTP.**

`Chilkat.SFtp` is Chilkat's main class for secure file transfer over SSH. It provides SSH connection and authentication, SFTP subsystem initialization, uploads, downloads, directory listings, remote file management, file attributes, handle-based file access, recursive synchronization, bandwidth throttling, proxy support, host key fingerprinting, SSH algorithm controls, and detailed diagnostics.

**SSH + SFTP setup**

Connect to an SSH server, authenticate with password or key-based credentials, then initialize the SFTP subsystem before file operations.

**Upload and download**

Transfer files using simple path-based APIs, in-memory data, streams, or handle-based methods when lower-level control is needed.

**Directory and file management**

List directories, create and remove folders, rename files, delete files, inspect attributes, and work with remote paths.

**Sync-tree operations**

Upload or download directory trees and synchronize local and remote folder structures.

**Security controls**

Verify host keys, control accepted SSH algorithms, use private keys, and configure proxy or network settings when required.

**Diagnostics and reliability**

Use detailed error text, session logs, progress callbacks, bandwidth limits, and timeout settings to troubleshoot real-world server behavior.

**Common pattern:** Connect, authenticate, initialize SFTP, perform file operations using remote paths or handles, close any open handles, and disconnect. Use handle-based APIs for precise control, and synchronization methods for recursive folder transfers.

For an extended overview, see [SFtp Class Overview](https://www.chilkatsoft.com/sftp_class_overview.asp).

## Object creation, unlocking and error handling

**Object Creation**

```tcl
# 'this' is not a keyword in Tcl. It can freely be used as a variable name.
set this [new CkSFtp]
```

Call `Global.UnlockBundle` once at the start of the program, before using this or any other Chilkat class. Any string unlocks a fully functional 30-day trial; a purchased unlock code is used in production. See `guide.md` for the exact code in Tcl.

How failure is reported depends on the method's return type and is stated in the note under each method below. In every case the diagnostic text is in the `LastErrorText` property of the object whose method was called.

## Members common to every Chilkat class

Documented once per language in `common-members.md`; listed here so this page is self-contained.

| Property | Signature | Access | Meaning |
|---|---|---|---|
| `DebugLogFilePath` | `string # ckStr is a CkString CkSFtp_get_DebugLogFilePath $this $ckStr set strVal [CkSFtp_get_debugLogFilePath $this] CkSFtp_put_DebugLogFilePath $this $strVal` | read/write | If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. |
| `LastErrorHtml` | `string # ckStr is a CkString CkSFtp_get_LastErrorHtml $this $ckStr set strVal [CkSFtp_get_lastErrorHtml $this]` | read-only | Provides HTML-formatted information about the last called method or property. |
| `LastErrorText` | `string # ckStr is a CkString CkSFtp_get_LastErrorText $this $ckStr set strVal [CkSFtp_get_lastErrorText $this]` | read-only | Provides plain text information about the last called method or property. |
| `LastErrorXml` | `string # ckStr is a CkString CkSFtp_get_LastErrorXml $this $ckStr set strVal [CkSFtp_get_lastErrorXml $this]` | read-only | Provides XML-formatted information about the last called method or property. |
| `LastMethodSuccess` | `boolean 1/0 set boolVal [CkSFtp_get_LastMethodSuccess $this] CkSFtp_put_LastMethodSuccess $this $boolVal` | read/write | Indicates the success or failure of the most recent method call: `1` means success, `0` means failure. |
| `Utf8` | `boolean 1/0 set boolVal [CkSFtp_get_Utf8 $this] CkSFtp_put_Utf8 $this $boolVal` | read/write | When set to `1`, all `string` arguments and return values are interpreted as UTF-8 strings. |
| `VerboseLogging` | `boolean 1/0 set boolVal [CkSFtp_get_VerboseLogging $this] CkSFtp_put_VerboseLogging $this $boolVal` | read/write | If set to `1`, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. |
| `Version` | `string # ckStr is a CkString CkSFtp_get_Version $this $ckStr set strVal [CkSFtp_get_version $this]` | read-only | Version of the component/library, such as "10.1.0" |

## Member index

| Member | Kind | Signature |
|---|---|---|
| `AbortCurrent` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_AbortCurrent $this] CkSFtp_put_AbortCurrent $this $boolVal` |
| `AuthFailReason` | property, read-only | `integer set intVal [CkSFtp_get_AuthFailReason $this]` |
| `BandwidthThrottleDown` | property, read/write | `integer set intVal [CkSFtp_get_BandwidthThrottleDown $this] CkSFtp_put_BandwidthThrottleDown $this $intVal` |
| `BandwidthThrottleUp` | property, read/write | `integer set intVal [CkSFtp_get_BandwidthThrottleUp $this] CkSFtp_put_BandwidthThrottleUp $this $intVal` |
| `ClientIdentifier` | property, read/write | `string # ckStr is a CkString CkSFtp_get_ClientIdentifier $this $ckStr set strVal [CkSFtp_get_clientIdentifier $this] CkSFtp_put_ClientIdentifier $this $strVal` |
| `ClientIpAddress` | property, read/write | `string # ckStr is a CkString CkSFtp_get_ClientIpAddress $this $ckStr set strVal [CkSFtp_get_clientIpAddress $this] CkSFtp_put_ClientIpAddress $this $strVal` |
| `ConnectTimeoutMs` | property, read/write | `integer set intVal [CkSFtp_get_ConnectTimeoutMs $this] CkSFtp_put_ConnectTimeoutMs $this $intVal` |
| `DisconnectCode` | property, read-only | `integer set intVal [CkSFtp_get_DisconnectCode $this]` |
| `DisconnectReason` | property, read-only | `string # ckStr is a CkString CkSFtp_get_DisconnectReason $this $ckStr set strVal [CkSFtp_get_disconnectReason $this]` |
| `EnableCache` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_EnableCache $this] CkSFtp_put_EnableCache $this $boolVal` |
| `EnableCompression` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_EnableCompression $this] CkSFtp_put_EnableCompression $this $boolVal` |
| `EnableSecrets` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_EnableSecrets $this] CkSFtp_put_EnableSecrets $this $boolVal` |
| `FilenameCharset` | property, read/write | `string # ckStr is a CkString CkSFtp_get_FilenameCharset $this $ckStr set strVal [CkSFtp_get_filenameCharset $this] CkSFtp_put_FilenameCharset $this $strVal` |
| `ForceCipher` | property, read/write | `string # ckStr is a CkString CkSFtp_get_ForceCipher $this $ckStr set strVal [CkSFtp_get_forceCipher $this] CkSFtp_put_ForceCipher $this $strVal` |
| `ForceV3` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_ForceV3 $this] CkSFtp_put_ForceV3 $this $boolVal` |
| `HostKeyAlg` | property, read/write | `string # ckStr is a CkString CkSFtp_get_HostKeyAlg $this $ckStr set strVal [CkSFtp_get_hostKeyAlg $this] CkSFtp_put_HostKeyAlg $this $strVal` |
| `HostKeyFingerprint` | property, read-only | `string # ckStr is a CkString CkSFtp_get_HostKeyFingerprint $this $ckStr set strVal [CkSFtp_get_hostKeyFingerprint $this]` |
| `HttpProxyAuthMethod` | property, read/write | `string # ckStr is a CkString CkSFtp_get_HttpProxyAuthMethod $this $ckStr set strVal [CkSFtp_get_httpProxyAuthMethod $this] CkSFtp_put_HttpProxyAuthMethod $this $strVal` |
| `HttpProxyDomain` | property, read/write | `string # ckStr is a CkString CkSFtp_get_HttpProxyDomain $this $ckStr set strVal [CkSFtp_get_httpProxyDomain $this] CkSFtp_put_HttpProxyDomain $this $strVal` |
| `HttpProxyHostname` | property, read/write | `string # ckStr is a CkString CkSFtp_get_HttpProxyHostname $this $ckStr set strVal [CkSFtp_get_httpProxyHostname $this] CkSFtp_put_HttpProxyHostname $this $strVal` |
| `HttpProxyPassword` | property, read/write | `string # ckStr is a CkString CkSFtp_get_HttpProxyPassword $this $ckStr set strVal [CkSFtp_get_httpProxyPassword $this] CkSFtp_put_HttpProxyPassword $this $strVal` |
| `HttpProxyPort` | property, read/write | `integer set intVal [CkSFtp_get_HttpProxyPort $this] CkSFtp_put_HttpProxyPort $this $intVal` |
| `HttpProxyUsername` | property, read/write | `string # ckStr is a CkString CkSFtp_get_HttpProxyUsername $this $ckStr set strVal [CkSFtp_get_httpProxyUsername $this] CkSFtp_put_HttpProxyUsername $this $strVal` |
| `IdleTimeoutMs` | property, read/write | `integer set intVal [CkSFtp_get_IdleTimeoutMs $this] CkSFtp_put_IdleTimeoutMs $this $intVal` |
| `IncludeDotDirs` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_IncludeDotDirs $this] CkSFtp_put_IncludeDotDirs $this $boolVal` |
| `InitializeFailCode` | property, read-only | `integer set intVal [CkSFtp_get_InitializeFailCode $this]` |
| `InitializeFailReason` | property, read-only | `string # ckStr is a CkString CkSFtp_get_InitializeFailReason $this $ckStr set strVal [CkSFtp_get_initializeFailReason $this]` |
| `IsConnected` | property, read-only | `boolean 1/0 set boolVal [CkSFtp_get_IsConnected $this]` |
| `KeepSessionLog` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_KeepSessionLog $this] CkSFtp_put_KeepSessionLog $this $boolVal` |
| `LastStatusCode` | property, read-only | `integer set intVal [CkSFtp_get_LastStatusCode $this]` |
| `LastStatusMessage` | property, read-only | `string # ckStr is a CkString CkSFtp_get_LastStatusMessage $this $ckStr set strVal [CkSFtp_get_lastStatusMessage $this]` |
| `MaxPacketSize` | property, read/write | `integer set intVal [CkSFtp_get_MaxPacketSize $this] CkSFtp_put_MaxPacketSize $this $intVal` |
| `PasswordChangeRequested` | property, read-only | `boolean 1/0 set boolVal [CkSFtp_get_PasswordChangeRequested $this]` |
| `PreferIpv6` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_PreferIpv6 $this] CkSFtp_put_PreferIpv6 $this $boolVal` |
| `PreserveDate` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_PreserveDate $this] CkSFtp_put_PreserveDate $this $boolVal` |
| `ProtocolVersion` | property, read-only | `integer set intVal [CkSFtp_get_ProtocolVersion $this]` |
| `ReadDirMustMatch` | property, read/write | `string # ckStr is a CkString CkSFtp_get_ReadDirMustMatch $this $ckStr set strVal [CkSFtp_get_readDirMustMatch $this] CkSFtp_put_ReadDirMustMatch $this $strVal` |
| `ReadDirMustNotMatch` | property, read/write | `string # ckStr is a CkString CkSFtp_get_ReadDirMustNotMatch $this $ckStr set strVal [CkSFtp_get_readDirMustNotMatch $this] CkSFtp_put_ReadDirMustNotMatch $this $strVal` |
| `ServerIdentifier` | property, read-only | `string # ckStr is a CkString CkSFtp_get_ServerIdentifier $this $ckStr set strVal [CkSFtp_get_serverIdentifier $this]` |
| `SessionLog` | property, read-only | `string # ckStr is a CkString CkSFtp_get_SessionLog $this $ckStr set strVal [CkSFtp_get_sessionLog $this]` |
| `SocksHostname` | property, read/write | `string # ckStr is a CkString CkSFtp_get_SocksHostname $this $ckStr set strVal [CkSFtp_get_socksHostname $this] CkSFtp_put_SocksHostname $this $strVal` |
| `SocksPassword` | property, read/write | `string # ckStr is a CkString CkSFtp_get_SocksPassword $this $ckStr set strVal [CkSFtp_get_socksPassword $this] CkSFtp_put_SocksPassword $this $strVal` |
| `SocksPort` | property, read/write | `integer set intVal [CkSFtp_get_SocksPort $this] CkSFtp_put_SocksPort $this $intVal` |
| `SocksUsername` | property, read/write | `string # ckStr is a CkString CkSFtp_get_SocksUsername $this $ckStr set strVal [CkSFtp_get_socksUsername $this] CkSFtp_put_SocksUsername $this $strVal` |
| `SocksVersion` | property, read/write | `integer set intVal [CkSFtp_get_SocksVersion $this] CkSFtp_put_SocksVersion $this $intVal` |
| `SoRcvBuf` | property, read/write | `integer set intVal [CkSFtp_get_SoRcvBuf $this] CkSFtp_put_SoRcvBuf $this $intVal` |
| `SoSndBuf` | property, read/write | `integer set intVal [CkSFtp_get_SoSndBuf $this] CkSFtp_put_SoSndBuf $this $intVal` |
| `SyncCreateAllLocalDirs` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_SyncCreateAllLocalDirs $this] CkSFtp_put_SyncCreateAllLocalDirs $this $boolVal` |
| `SyncDirectives` | property, read/write | `string # ckStr is a CkString CkSFtp_get_SyncDirectives $this $ckStr set strVal [CkSFtp_get_syncDirectives $this] CkSFtp_put_SyncDirectives $this $strVal` |
| `SyncMustMatch` | property, read/write | `string # ckStr is a CkString CkSFtp_get_SyncMustMatch $this $ckStr set strVal [CkSFtp_get_syncMustMatch $this] CkSFtp_put_SyncMustMatch $this $strVal` |
| `SyncMustMatchDir` | property, read/write | `string # ckStr is a CkString CkSFtp_get_SyncMustMatchDir $this $ckStr set strVal [CkSFtp_get_syncMustMatchDir $this] CkSFtp_put_SyncMustMatchDir $this $strVal` |
| `SyncMustNotMatch` | property, read/write | `string # ckStr is a CkString CkSFtp_get_SyncMustNotMatch $this $ckStr set strVal [CkSFtp_get_syncMustNotMatch $this] CkSFtp_put_SyncMustNotMatch $this $strVal` |
| `SyncMustNotMatchDir` | property, read/write | `string # ckStr is a CkString CkSFtp_get_SyncMustNotMatchDir $this $ckStr set strVal [CkSFtp_get_syncMustNotMatchDir $this] CkSFtp_put_SyncMustNotMatchDir $this $strVal` |
| `TcpNoDelay` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_TcpNoDelay $this] CkSFtp_put_TcpNoDelay $this $boolVal` |
| `UncommonOptions` | property, read/write | `string # ckStr is a CkString CkSFtp_get_UncommonOptions $this $ckStr set strVal [CkSFtp_get_uncommonOptions $this] CkSFtp_put_UncommonOptions $this $strVal` |
| `UploadChunkSize` | property, read/write | `integer set intVal [CkSFtp_get_UploadChunkSize $this] CkSFtp_put_UploadChunkSize $this $intVal` |
| `UserAuthBanner` | property, read/write | `string # ckStr is a CkString CkSFtp_get_UserAuthBanner $this $ckStr set strVal [CkSFtp_get_userAuthBanner $this] CkSFtp_put_UserAuthBanner $this $strVal` |
| `UtcMode` | property, read/write | `boolean 1/0 set boolVal [CkSFtp_get_UtcMode $this] CkSFtp_put_UtcMode $this $boolVal` |
| `XferByteCount` | property, read-only | `unsigned integer set intVal [CkSFtp_get_XferByteCount $this]` |
| `XferByteCount64` | property, read-only | `(64-bit integer) set int64Val [CkSFtp_get_XferByteCount64 $this]` |
| `AuthenticatePk` | method | `# username is a string # privateKey is a CkSshKey set status [CkSFtp_AuthenticatePk $this $username $privateKey]` |
| `AuthenticatePw` | method | `# login is a string # password is a string set status [CkSFtp_AuthenticatePw $this $login $password]` |
| `AuthenticatePwPk` | method | `# username is a string # password is a string # privateKey is a CkSshKey set status [CkSFtp_AuthenticatePwPk $this $username $password $privateKey]` |
| `AuthenticateSecPw` | method | `# login is a CkSecureString # password is a CkSecureString set status [CkSFtp_AuthenticateSecPw $this $login $password]` |
| `AuthenticateSecPwPk` | method | `# username is a CkSecureString # password is a CkSecureString # privateKey is a CkSshKey set status [CkSFtp_AuthenticateSecPwPk $this $username $password $privateKey]` |
| `ClearCache` | method | `CkSFtp_ClearCache $this` |
| `ClearSessionLog` | method | `CkSFtp_ClearSessionLog $this` |
| `CloseHandle` | method | `# handle is a string set status [CkSFtp_CloseHandle $this $handle]` |
| `Connect` | method | `# domainName is a string # port is an integer set status [CkSFtp_Connect $this $domainName $port]` |
| `ConnectThroughSsh` | method | `# sshConn is a CkSsh # hostname is a string # port is an integer set status [CkSFtp_ConnectThroughSsh $this $sshConn $hostname $port]` |
| `ContinueKeyboardAuth` | method | `# response is a string # outStr is a CkString (output) set status [CkSFtp_ContinueKeyboardAuth $this $response $outStr] set retStr [CkSFtp_continueKeyboardAuth $this $response]` |
| `CopyFileAttr` | method | `# localFilename is a string # remoteFilename is a string # isHandle is a boolean set status [CkSFtp_CopyFileAttr $this $localFilename $remoteFilename $isHandle]` |
| `CreateDir` | method | `# path is a string set status [CkSFtp_CreateDir $this $path]` |
| `Disconnect` | method | `CkSFtp_Disconnect $this` |
| `DownloadBd` | method | `# remoteFilePath is a string # binData is a CkBinData set status [CkSFtp_DownloadBd $this $remoteFilePath $binData]` |
| `DownloadFile` | method | `# handle is a string # toFilename is a string set status [CkSFtp_DownloadFile $this $handle $toFilename]` |
| `DownloadFileByName` | method | `# remoteFilePath is a string # localFilePath is a string set status [CkSFtp_DownloadFileByName $this $remoteFilePath $localFilePath]` |
| `DownloadSb` | method | `# remoteFilePath is a string # charset is a string # sb is a CkStringBuilder set status [CkSFtp_DownloadSb $this $remoteFilePath $charset $sb]` |
| `Eof` | method | `# handle is a string set retBool [CkSFtp_Eof $this $handle]` |
| `FileExists` | method | `# remotePath is a string # followLinks is a boolean set retInt [CkSFtp_FileExists $this $remotePath $followLinks]` |
| `Fsync` | method | `# handle is a string set status [CkSFtp_Fsync $this $handle]` |
| `GetFileCreateTimeStr` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean # outStr is a CkString (output) set status [CkSFtp_GetFileCreateTimeStr $this $pathOrHandle $bFollowLinks $bIsHandle $outStr] set retStr [CkSFtp_getFileCreateTimeStr $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetFileGroup` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean # outStr is a CkString (output) set status [CkSFtp_GetFileGroup $this $pathOrHandle $bFollowLinks $bIsHandle $outStr] set retStr [CkSFtp_getFileGroup $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetFileLastAccessStr` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean # outStr is a CkString (output) set status [CkSFtp_GetFileLastAccessStr $this $pathOrHandle $bFollowLinks $bIsHandle $outStr] set retStr [CkSFtp_getFileLastAccessStr $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetFileLastModifiedStr` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean # outStr is a CkString (output) set status [CkSFtp_GetFileLastModifiedStr $this $pathOrHandle $bFollowLinks $bIsHandle $outStr] set retStr [CkSFtp_getFileLastModifiedStr $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetFileOwner` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean # outStr is a CkString (output) set status [CkSFtp_GetFileOwner $this $pathOrHandle $bFollowLinks $bIsHandle $outStr] set retStr [CkSFtp_getFileOwner $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetFilePermissions` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean set retInt [CkSFtp_GetFilePermissions $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetFileSize32` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean set retInt [CkSFtp_GetFileSize32 $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetFileSize64` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean set retInt64 [CkSFtp_GetFileSize64 $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetFileSizeStr` | method | `# pathOrHandle is a string # bFollowLinks is a boolean # bIsHandle is a boolean # outStr is a CkString (output) set status [CkSFtp_GetFileSizeStr $this $pathOrHandle $bFollowLinks $bIsHandle $outStr] set retStr [CkSFtp_getFileSizeStr $this $pathOrHandle $bFollowLinks $bIsHandle]` |
| `GetHostKeyFP` | method | `# hashAlg is a string # includeKeyType is a boolean # includeHashName is a boolean # outStr is a CkString (output) set status [CkSFtp_GetHostKeyFP $this $hashAlg $includeKeyType $includeHashName $outStr] set retStr [CkSFtp_getHostKeyFP $this $hashAlg $includeKeyType $includeHashName]` |
| `GetLastJsonData` | method | `# json is a CkJsonObject CkSFtp_GetLastJsonData $this $json` |
| `GetSyncedFiles` | method | `# strTab is a CkStringTable CkSFtp_GetSyncedFiles $this $strTab` |
| `HardLink` | method | `# oldPath is a string # newPath is a string set status [CkSFtp_HardLink $this $oldPath $newPath]` |
| `InitializeSftp` | method | `set status [CkSFtp_InitializeSftp $this]` |
| `LastReadFailed` | method | `# handle is a string set retBool [CkSFtp_LastReadFailed $this $handle]` |
| `LastReadNumBytes` | method | `# handle is a string set retInt [CkSFtp_LastReadNumBytes $this $handle]` |
| `LoadTaskCaller` | method | `# task is a CkTask set status [CkSFtp_LoadTaskCaller $this $task]` |
| `OpenDir` | method | `# path is a string # outStr is a CkString (output) set status [CkSFtp_OpenDir $this $path $outStr] set retStr [CkSFtp_openDir $this $path]` |
| `OpenFile` | method | `# remotePath is a string # access is a string # createDisposition is a string # outStr is a CkString (output) set status [CkSFtp_OpenFile $this $remotePath $access $createDisposition $outStr] set retStr [CkSFtp_openFile $this $remotePath $access $createDisposition]` |
| `ReadDirListing` | method | `# handle is a string # dirObj is a CkSFtpDir set status [CkSFtp_ReadDirListing $this $handle $dirObj]` |
| `ReadFileBd` | method | `# handle is a string # numBytes is an integer # bd is a CkBinData set status [CkSFtp_ReadFileBd $this $handle $numBytes $bd]` |
| `ReadFileText` | method | `# handle is a string # numBytes is an integer # charset is a string # outStr is a CkString (output) set status [CkSFtp_ReadFileText $this $handle $numBytes $charset $outStr] set retStr [CkSFtp_readFileText $this $handle $numBytes $charset]` |
| `ReadFileText32` | method | `# handle is a string # offset is an integer # numBytes is an integer # charset is a string # outStr is a CkString (output) set status [CkSFtp_ReadFileText32 $this $handle $offset $numBytes $charset $outStr] set retStr [CkSFtp_readFileText32 $this $handle $offset $numBytes $charset]` |
| `ReadFileText64` | method | `# handle is a string # offset is a 64-bit integer # numBytes is an integer # charset is a string # outStr is a CkString (output) set status [CkSFtp_ReadFileText64 $this $handle $offset $numBytes $charset $outStr] set retStr [CkSFtp_readFileText64 $this $handle $offset $numBytes $charset]` |
| `ReadFileText64s` | method | `# handle is a string # offset is a string # numBytes is an integer # charset is a string # outStr is a CkString (output) set status [CkSFtp_ReadFileText64s $this $handle $offset $numBytes $charset $outStr] set retStr [CkSFtp_readFileText64s $this $handle $offset $numBytes $charset]` |
| `ReadLink` | method | `# path is a string # outStr is a CkString (output) set status [CkSFtp_ReadLink $this $path $outStr] set retStr [CkSFtp_readLink $this $path]` |
| `RealPath` | method | `# originalPath is a string # composePath is a string # outStr is a CkString (output) set status [CkSFtp_RealPath $this $originalPath $composePath $outStr] set retStr [CkSFtp_realPath $this $originalPath $composePath]` |
| `RemoveDir` | method | `# path is a string set status [CkSFtp_RemoveDir $this $path]` |
| `RemoveFile` | method | `# filename is a string set status [CkSFtp_RemoveFile $this $filename]` |
| `RenameFileOrDir` | method | `# oldPath is a string # newPath is a string set status [CkSFtp_RenameFileOrDir $this $oldPath $newPath]` |
| `ResumeDownloadFileByName` | method | `# remoteFilePath is a string # localFilePath is a string set status [CkSFtp_ResumeDownloadFileByName $this $remoteFilePath $localFilePath]` |
| `ResumeUploadFileByName` | method | `# remoteFilePath is a string # localFilePath is a string set status [CkSFtp_ResumeUploadFileByName $this $remoteFilePath $localFilePath]` |
| `SendIgnore` | method | `set status [CkSFtp_SendIgnore $this]` |
| `SetAllowedAlgorithms` | method | `# json is a CkJsonObject set status [CkSFtp_SetAllowedAlgorithms $this $json]` |
| `SetCreateDt` | method | `# pathOrHandle is a string # isHandle is a boolean # createDateTime is a CkDateTime set status [CkSFtp_SetCreateDt $this $pathOrHandle $isHandle $createDateTime]` |
| `SetCreateTimeStr` | method | `# pathOrHandle is a string # bIsHandle is a boolean # dateTimeStr is a string set status [CkSFtp_SetCreateTimeStr $this $pathOrHandle $bIsHandle $dateTimeStr]` |
| `SetLastAccessDt` | method | `# pathOrHandle is a string # isHandle is a boolean # accessDateTime is a CkDateTime set status [CkSFtp_SetLastAccessDt $this $pathOrHandle $isHandle $accessDateTime]` |
| `SetLastAccessTimeStr` | method | `# pathOrHandle is a string # bIsHandle is a boolean # dateTimeStr is a string set status [CkSFtp_SetLastAccessTimeStr $this $pathOrHandle $bIsHandle $dateTimeStr]` |
| `SetLastModifiedDt` | method | `# pathOrHandle is a string # isHandle is a boolean # modifiedDateTime is a CkDateTime set status [CkSFtp_SetLastModifiedDt $this $pathOrHandle $isHandle $modifiedDateTime]` |
| `SetLastModifiedTimeStr` | method | `# pathOrHandle is a string # bIsHandle is a boolean # dateTimeStr is a string set status [CkSFtp_SetLastModifiedTimeStr $this $pathOrHandle $bIsHandle $dateTimeStr]` |
| `SetOwnerAndGroup` | method | `# pathOrHandle is a string # isHandle is a boolean # owner is a string # group is a string set status [CkSFtp_SetOwnerAndGroup $this $pathOrHandle $isHandle $owner $group]` |
| `SetPermissions` | method | `# pathOrHandle is a string # isHandle is a boolean # permissions is an integer set status [CkSFtp_SetPermissions $this $pathOrHandle $isHandle $permissions]` |
| `StartKeyboardAuth` | method | `# login is a string # outStr is a CkString (output) set status [CkSFtp_StartKeyboardAuth $this $login $outStr] set retStr [CkSFtp_startKeyboardAuth $this $login]` |
| `SymLink` | method | `# oldPath is a string # newPath is a string set status [CkSFtp_SymLink $this $oldPath $newPath]` |
| `SyncTreeDownload` | method | `# remoteRoot is a string # localRoot is a string # mode is an integer # recurse is a boolean set status [CkSFtp_SyncTreeDownload $this $remoteRoot $localRoot $mode $recurse]` |
| `SyncTreeUpload` | method | `# localBaseDir is a string # remoteBaseDir is a string # mode is an integer # bRecurse is a boolean set status [CkSFtp_SyncTreeUpload $this $localBaseDir $remoteBaseDir $mode $bRecurse]` |
| `UploadBd` | method | `# binData is a CkBinData # remoteFilePath is a string set status [CkSFtp_UploadBd $this $binData $remoteFilePath]` |
| `UploadFile` | method | `# handle is a string # fromLocalFilePath is a string set status [CkSFtp_UploadFile $this $handle $fromLocalFilePath]` |
| `UploadFileByName` | method | `# remoteFilePath is a string # localFilePath is a string set status [CkSFtp_UploadFileByName $this $remoteFilePath $localFilePath]` |
| `UploadSb` | method | `# sb is a CkStringBuilder # remoteFilePath is a string # charset is a string # includeBom is a boolean set status [CkSFtp_UploadSb $this $sb $remoteFilePath $charset $includeBom]` |
| `WriteFileBd` | method | `# handle is a string # bd is a CkBinData set status [CkSFtp_WriteFileBd $this $handle $bd]` |
| `WriteFileText` | method | `# handle is a string # charset is a string # textData is a string set status [CkSFtp_WriteFileText $this $handle $charset $textData]` |
| `WriteFileText32` | method | `# handle is a string # offset32 is an integer # charset is a string # textData is a string set status [CkSFtp_WriteFileText32 $this $handle $offset32 $charset $textData]` |
| `WriteFileText64` | method | `# handle is a string # offset64 is a 64-bit integer # charset is a string # textData is a string set status [CkSFtp_WriteFileText64 $this $handle $offset64 $charset $textData]` |
| `WriteFileText64s` | method | `# handle is a string # offset64 is a string # charset is a string # textData is a string set status [CkSFtp_WriteFileText64s $this $handle $offset64 $charset $textData]` |

Deprecated members are listed at the end of this file with their replacements; do not use them in new code.

## Properties

### SFtp.AbortCurrent

`Chilkat 11.7.0 · tcl · SFtp · AbortCurrent · property · read/write · since 9.5.0.58`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_AbortCurrent $this]

CkSFtp_put_AbortCurrent $this $boolVal
```

Set to `1` to request that the currently running Chilkat operation abort. Both synchronous and asynchronous operations can be canceled; a synchronous call may be interrupted by setting this property from another thread.

When the abort is observed, the current method returns failure and Chilkat resets this property to `0`. If no method is running, it is reset when the next method begins.

### SFtp.AuthFailReason

`Chilkat 11.7.0 · tcl · SFtp · AuthFailReason · property · read-only · since 9.5.0.52`

```tcl
integer
set intVal [CkSFtp_get_AuthFailReason $this]
```

Contains the result code from the most recent call to `AuthenticatePw`, `AuthenticatePk`, `AuthenticatePwPk`, or a corresponding secure-string authentication method.

| Value | Meaning |
| :--- | :--- |
| `1` | Transport failure: communication was lost, or a network read or write failed or timed out. |
| `2` | Invalid private key: the key format, key type, or key contents are not suitable for public-key authentication. |
| `3` | No mutually supported authentication method is available. |
| `4` | SSH authentication protocol error: an unexpected or invalid message was received. |
| `5` | The server rejected the supplied password or private key. |
| `6` | The SSH session is already authenticated. |
| `7` | The server requires a password change. See `PasswordChangeRequested`. |

Read this property immediately after an authentication method fails. Also inspect `LastErrorText` for detailed diagnostics.

**Lifetime:** A later successful authentication does not necessarily reset this value. Consult it only immediately after an authentication method returns `0`; do not use an older value to describe the current session.

### SFtp.BandwidthThrottleDown

`Chilkat 11.7.0 · tcl · SFtp · BandwidthThrottleDown · property · read/write · since 9.5.0.49`

```tcl
integer
set intVal [CkSFtp_get_BandwidthThrottleDown $this]

CkSFtp_put_BandwidthThrottleDown $this $intVal
```

Specifies the approximate maximum download rate, in bytes per second. The default is `0`, which disables download throttling.

Bandwidth throttling is approximate. Actual throughput can vary because of network latency, SSH framing, buffering, and server behavior.

### SFtp.BandwidthThrottleUp

`Chilkat 11.7.0 · tcl · SFtp · BandwidthThrottleUp · property · read/write · since 9.5.0.49`

```tcl
integer
set intVal [CkSFtp_get_BandwidthThrottleUp $this]

CkSFtp_put_BandwidthThrottleUp $this $intVal
```

Specifies the approximate maximum upload rate, in bytes per second. The default is `0`, which disables upload throttling.

Bandwidth throttling is approximate. Actual throughput can vary because of network latency, SSH framing, buffering, and server behavior.

### SFtp.ClientIdentifier

`Chilkat 11.7.0 · tcl · SFtp · ClientIdentifier · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_ClientIdentifier $this $ckStr

set strVal [CkSFtp_get_clientIdentifier $this]

CkSFtp_put_ClientIdentifier $this $strVal
```

Specifies the SSH client-identification string sent when a connection is established. The default begins with `SSH-2.0-Chilkat_` followed by the Chilkat version, for example `SSH-2.0-Chilkat_11.6.0`.

The value should begin with `SSH-2.0-`. A server may disconnect if the identification string is invalid.

### SFtp.ClientIpAddress

`Chilkat 11.7.0 · tcl · SFtp · ClientIpAddress · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_ClientIpAddress $this $ckStr

set strVal [CkSFtp_get_clientIpAddress $this]

CkSFtp_put_ClientIpAddress $this $strVal
```

**This property is normally left unset.** Set it only on a multihomed computer when the application must bind the outgoing connection to a specific local network interface.

Specify a numeric IPv4 or IPv6 address, not a hostname. When the property is empty, the operating system automatically chooses the local address.

### SFtp.ConnectTimeoutMs

`Chilkat 11.7.0 · tcl · SFtp · ConnectTimeoutMs · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_ConnectTimeoutMs $this]

CkSFtp_put_ConnectTimeoutMs $this $intVal
```

Specifies the maximum number of milliseconds allowed for the remote endpoint to accept the TCP connection.

This setting covers TCP connection establishment. After the socket is connected, receive and transfer inactivity are governed by `IdleTimeoutMs` and method-specific timeouts.

### SFtp.DisconnectCode

`Chilkat 11.7.0 · tcl · SFtp · DisconnectCode · property · read-only`

```tcl
integer
set intVal [CkSFtp_get_DisconnectCode $this]
```

Contains the RFC 4253 reason code from the most recent SSH `DISCONNECT` message received from the server. A value of `0` means no server-provided disconnect code is available.

| Code | Symbolic name |
| :--- | :--- |
| `1` | `SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT` |
| `2` | `SSH_DISCONNECT_PROTOCOL_ERROR` |
| `3` | `SSH_DISCONNECT_KEY_EXCHANGE_FAILED` |
| `4` | `SSH_DISCONNECT_RESERVED` |
| `5` | `SSH_DISCONNECT_MAC_ERROR` |
| `6` | `SSH_DISCONNECT_COMPRESSION_ERROR` |
| `7` | `SSH_DISCONNECT_SERVICE_NOT_AVAILABLE` |
| `8` | `SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED` |
| `9` | `SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE` |
| `10` | `SSH_DISCONNECT_CONNECTION_LOST` |
| `11` | `SSH_DISCONNECT_BY_APPLICATION` |
| `12` | `SSH_DISCONNECT_TOO_MANY_CONNECTIONS` |
| `13` | `SSH_DISCONNECT_AUTH_CANCELLED_BY_USER` |
| `14` | `SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE` |
| `15` | `SSH_DISCONNECT_ILLEGAL_USER_NAME` |

See `DisconnectReason` for the server-provided descriptive text.

### SFtp.DisconnectReason

`Chilkat 11.7.0 · tcl · SFtp · DisconnectReason · property · read-only`

```tcl
string
# ckStr is a CkString

CkSFtp_get_DisconnectReason $this $ckStr

set strVal [CkSFtp_get_disconnectReason $this]
```

Contains the descriptive text sent with the most recent server SSH `DISCONNECT` message. See `DisconnectCode` for the corresponding RFC 4253 reason code.

The text is supplied by the server and can be empty or generic. An ordinary TCP loss or a local disconnect does not necessarily produce an SSH disconnect reason.

### SFtp.EnableCache

`Chilkat 11.7.0 · tcl · SFtp · EnableCache · property · read/write`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_EnableCache $this]

CkSFtp_put_EnableCache $this $boolVal
```

Controls whether Chilkat caches remote file sizes and attributes requested by `GetFileSize32`, `GetFileSize64`, `GetFileSizeStr`, `GetFileCreateTimeStr`, `GetFileLastAccessStr`, `GetFileLastModifiedStr`, `GetFileOwner`, `GetFileGroup`, `GetFilePermissions`. The default is `0`.

When enabled, requesting one attribute by filename causes the complete attribute set for that file to be cached. Later attribute requests for the same filename can be satisfied without another server round trip.

Caching applies only when a remote path is used, not when an open handle is used. Call `ClearCache` when remote metadata may have changed.

### SFtp.EnableCompression

`Chilkat 11.7.0 · tcl · SFtp · EnableCompression · property · read/write · since 9.5.0.56`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_EnableCompression $this]

CkSFtp_put_EnableCompression $this $boolVal
```

Controls whether SSH compression may be negotiated. The default is `0`.

Some older servers advertise compression but fail when it is enabled. If the server disconnects during or immediately after connection or authentication, try leaving this property `0`.

### SFtp.EnableSecrets

`Chilkat 11.7.0 · tcl · SFtp · EnableSecrets · property · read/write · since 11.5.0`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_EnableSecrets $this]

CkSFtp_put_EnableSecrets $this $boolVal
```

**Full documentation for this property (same in every language):** [More Detailed Information About EnableSecrets](https://www.chilkatsoft.com/ai-docs/v/11.7.0/articles/secret_specification_strings.md)

Enables automatic resolution of secret specification strings from secure operating-system storage. The default is `0`.

When `1`, supported password properties and authentication methods may receive a value beginning with `!!` instead of a literal credential. Chilkat resolves the secret from Windows Credential Manager on Windows or Apple Keychain on macOS.

Secret specification format:

```
!![appName|]service[|domain]|username
```

This feature applies to `HttpProxyPassword`, `SocksPassword`, `AuthenticatePw`, and `AuthenticatePwPk`.

### SFtp.FilenameCharset

`Chilkat 11.7.0 · tcl · SFtp · FilenameCharset · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_FilenameCharset $this $ckStr

set strVal [CkSFtp_get_filenameCharset $this]

CkSFtp_put_FilenameCharset $this $strVal
```

Specifies the character encoding used for SFTP filenames. During `InitializeSftp`, Chilkat automatically sets this property when the server supplies a `filename-charset` extension.

When the property is empty, incoming and outgoing filenames use UTF-8. Otherwise, Chilkat uses the specified charset, such as `utf-8`, `iso-8859-1`, or `windows-1252`.

Use an explicit charset only when required by the server. UTF-8 is the normal SFTP filename encoding.

### SFtp.ForceCipher

`Chilkat 11.7.0 · tcl · SFtp · ForceCipher · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_ForceCipher $this $ckStr

set strVal [CkSFtp_get_forceCipher $this]

CkSFtp_put_ForceCipher $this $strVal
```

Restricts SSH cipher negotiation to a single cipher. Leave this property empty to use Chilkat's normal preference order. For broader algorithm control, use `SetAllowedAlgorithms`.

| Cipher name | Family |
| :--- | :--- |
| `chacha20-poly1305@openssh.com` | ChaCha20-Poly1305 authenticated encryption |
| `aes128-ctr, aes192-ctr, aes256-ctr` | AES in CTR mode |
| `aes128-cbc, aes192-cbc, aes256-cbc` | AES in CBC mode |
| `aes128-gcm@openssh.com, aes256-gcm@openssh.com` | AES-GCM authenticated encryption |
| `twofish128-cbc, twofish256-cbc` | Twofish in CBC mode |
| `blowfish-cbc` | Blowfish in CBC mode |

If the server does not support the selected cipher, `Connect` fails.

### SFtp.ForceV3

`Chilkat 11.7.0 · tcl · SFtp · ForceV3 · property · read/write`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_ForceV3 $this]

CkSFtp_put_ForceV3 $this $boolVal
```

Controls SFTP protocol-version negotiation. The default is `1`, which forces use of SFTP v3 even when the server supports a newer version.

Set this property to `0` before `InitializeSftp` when the application needs features introduced in SFTP v4, v5, or v6. After initialization, read `ProtocolVersion` to determine the negotiated version.

### SFtp.HostKeyAlg

`Chilkat 11.7.0 · tcl · SFtp · HostKeyAlg · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_HostKeyAlg $this $ckStr

set strVal [CkSFtp_get_hostKeyAlg $this]

CkSFtp_put_HostKeyAlg $this $strVal
```

Specifies the preferred host-key algorithm used during SSH connection establishment. The default is `DSS`; set it to `RSA` only when required for compatibility with a particular server.

Normally this property should be left unchanged.

### SFtp.HostKeyFingerprint

`Chilkat 11.7.0 · tcl · SFtp · HostKeyFingerprint · property · read-only`

```tcl
string
# ckStr is a CkString

CkSFtp_get_HostKeyFingerprint $this $ckStr

set strVal [CkSFtp_get_hostKeyFingerprint $this]
```

Contains the connected server's host-key fingerprint in Chilkat's legacy MD5 format. The value is set after a successful SSH connection.

```
ssh-rsa 2048 68:ff:d1:4e:6c:ff:d7:b0:d6:58:73:85:07:bc:2e:d5
ssh-ed25519 256 c8:73:22:c7:82:aa:09:f1:1c:4e:99:8a:a0:62:a7:87
```

For new applications, use `GetHostKeyFP` with `SHA256`. Compare the fingerprint with a value obtained from a trusted source before sending credentials.

The value is cleared by `Disconnect`. Obtain and validate it while the SSH connection is active.

### SFtp.HttpProxyAuthMethod

`Chilkat 11.7.0 · tcl · SFtp · HttpProxyAuthMethod · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_HttpProxyAuthMethod $this $ckStr

set strVal [CkSFtp_get_httpProxyAuthMethod $this]

CkSFtp_put_HttpProxyAuthMethod $this $strVal
```

Specifies the authentication method used by an HTTP proxy. Matching is case-insensitive.

| Value | Behavior |
| :--- | :--- |
| *empty* | Automatically negotiate a supported method. |
| `Basic` | Use HTTP Basic authentication. |
| `NTLM` | Use NTLM authentication. |

### SFtp.HttpProxyDomain

`Chilkat 11.7.0 · tcl · SFtp · HttpProxyDomain · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_HttpProxyDomain $this $ckStr

set strVal [CkSFtp_get_httpProxyDomain $this]

CkSFtp_put_HttpProxyDomain $this $strVal
```

Specifies the optional Windows domain used for NTLM authentication with an HTTP proxy. This property is ignored for Basic authentication.

### SFtp.HttpProxyHostname

`Chilkat 11.7.0 · tcl · SFtp · HttpProxyHostname · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_HttpProxyHostname $this $ckStr

set strVal [CkSFtp_get_httpProxyHostname $this]

CkSFtp_put_HttpProxyHostname $this $strVal
```

Specifies the hostname or numeric IP address of an HTTP proxy used to establish the SSH connection.

Set this property together with `HttpProxyPort`. A configured SOCKS proxy takes precedence when `SocksVersion` is `4` or `5`.

### SFtp.HttpProxyPassword

`Chilkat 11.7.0 · tcl · SFtp · HttpProxyPassword · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_HttpProxyPassword $this $ckStr

set strVal [CkSFtp_get_httpProxyPassword $this]

CkSFtp_put_HttpProxyPassword $this $strVal
```

Specifies the password used to authenticate with an HTTP proxy.

### SFtp.HttpProxyPort

`Chilkat 11.7.0 · tcl · SFtp · HttpProxyPort · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_HttpProxyPort $this]

CkSFtp_put_HttpProxyPort $this $intVal
```

Specifies the HTTP proxy port. Common values include `8080` and `3128`.

The proxy is used when `HttpProxyHostname` is nonempty, this property is nonzero, and `SocksVersion` is `0`.

### SFtp.HttpProxyUsername

`Chilkat 11.7.0 · tcl · SFtp · HttpProxyUsername · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_HttpProxyUsername $this $ckStr

set strVal [CkSFtp_get_httpProxyUsername $this]

CkSFtp_put_HttpProxyUsername $this $strVal
```

Specifies the username used to authenticate with an HTTP proxy.

### SFtp.IdleTimeoutMs

`Chilkat 11.7.0 · tcl · SFtp · IdleTimeoutMs · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_IdleTimeoutMs $this]

CkSFtp_put_IdleTimeoutMs $this $intVal
```

Specifies the maximum period, in milliseconds, during which an SFTP operation may make no progress while sending or receiving data. The default is `30000` (30 seconds).

Set this property to `0` to allow an operation to wait indefinitely.

### SFtp.IncludeDotDirs

`Chilkat 11.7.0 · tcl · SFtp · IncludeDotDirs · property · read/write`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_IncludeDotDirs $this]

CkSFtp_put_IncludeDotDirs $this $boolVal
```

Controls whether `ReadDir` and `ReadDirListing` include the special `.` and `..` directory entries. The default is `0`.

This property controls only the special directory entries `.` and `..`. It does not exclude ordinary hidden filenames such as `.gitignore` or `.profile`.

### SFtp.InitializeFailCode

`Chilkat 11.7.0 · tcl · SFtp · InitializeFailCode · property · read-only`

```tcl
integer
set intVal [CkSFtp_get_InitializeFailCode $this]
```

Contains the RFC 4254 channel-open failure code when `InitializeSftp` cannot open the SFTP session channel. The initial value is `0`.

| Code | Symbolic name |
| :--- | :--- |
| `1` | `SSH_OPEN_ADMINISTRATIVELY_PROHIBITED` |
| `2` | `SSH_OPEN_CONNECT_FAILED` |
| `3` | `SSH_OPEN_UNKNOWN_CHANNEL_TYPE` |
| `4` | `SSH_OPEN_RESOURCE_SHORTAGE` |

### SFtp.InitializeFailReason

`Chilkat 11.7.0 · tcl · SFtp · InitializeFailReason · property · read-only`

```tcl
string
# ckStr is a CkString

CkSFtp_get_InitializeFailReason $this $ckStr

set strVal [CkSFtp_get_initializeFailReason $this]
```

Contains the descriptive text associated with `InitializeFailCode` when `InitializeSftp` cannot open the SFTP session channel. The text is supplied by the server and may be empty or generic.

### SFtp.IsConnected

`Chilkat 11.7.0 · tcl · SFtp · IsConnected · property · read-only`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_IsConnected $this]
```

Returns `1` when Chilkat's last known state indicates that the underlying SSH transport is connected. This means `Connect` succeeded; it does not mean authentication or `InitializeSftp` has completed.

This property is passive and does not perform network I/O. A silent network failure or a peer close may remain undetected until an operation reads from or writes to the socket.

To actively test whether the connection is still writable, call `SendIgnore` and check its return value. The server does not reply to an SSH `IGNORE` message.

### SFtp.KeepSessionLog

`Chilkat 11.7.0 · tcl · SFtp · KeepSessionLog · property · read/write`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_KeepSessionLog $this]

CkSFtp_put_KeepSessionLog $this $boolVal
```

Controls whether SSH and SFTP protocol traffic is accumulated in `SessionLog`. The default is `0`.

Session logging is intended for diagnostics and grows as activity continues. Disable it when no longer needed and treat the resulting log as potentially sensitive.

### SFtp.LastStatusCode

`Chilkat 11.7.0 · tcl · SFtp · LastStatusCode · property · read-only · since 9.5.0.85`

```tcl
integer
set intVal [CkSFtp_get_LastStatusCode $this]
```

Contains the numeric code from the most recently received SFTP `SSH_FXP_STATUS` response. This is not necessarily the status of the most recently called method. Methods that return a handle, attributes, or data can complete without receiving a new status response, leaving an older value unchanged. A successful method can therefore leave a previous nonzero status code in this property.

| Code | Symbolic name |
| :--- | :--- |
| `0` | `SSH_FX_OK` |
| `1` | `SSH_FX_EOF` |
| `2` | `SSH_FX_NO_SUCH_FILE` |
| `3` | `SSH_FX_PERMISSION_DENIED` |
| `4` | `SSH_FX_FAILURE` |
| `5` | `SSH_FX_BAD_MESSAGE` |
| `6` | `SSH_FX_NO_CONNECTION` |
| `7` | `SSH_FX_CONNECTION_LOST` |
| `8` | `SSH_FX_OP_UNSUPPORTED` |
| `9` | `SSH_FX_INVALID_HANDLE` |
| `10` | `SSH_FX_NO_SUCH_PATH` |
| `11` | `SSH_FX_FILE_ALREADY_EXISTS` |
| `12` | `SSH_FX_WRITE_PROTECT` |
| `13` | `SSH_FX_NO_MEDIA` |
| `14` | `SSH_FX_NO_SPACE_ON_FILESYSTEM` |
| `15` | `SSH_FX_QUOTA_EXCEEDED` |
| `16` | `SSH_FX_UNKNOWN_PRINCIPAL` |
| `17` | `SSH_FX_LOCK_CONFLICT` |
| `18` | `SSH_FX_DIR_NOT_EMPTY` |
| `19` | `SSH_FX_NOT_A_DIRECTORY` |
| `20` | `SSH_FX_INVALID_FILENAME` |
| `21` | `SSH_FX_LINK_LOOP` |
| `22` | `SSH_FX_CANNOT_DELETE` |
| `23` | `SSH_FX_INVALID_PARAMETER` |
| `24` | `SSH_FX_FILE_IS_A_DIRECTORY` |
| `25` | `SSH_FX_BYTE_RANGE_LOCK_CONFLICT` |
| `26` | `SSH_FX_BYTE_RANGE_LOCK_REFUSED` |
| `27` | `SSH_FX_DELETE_PENDING` |
| `28` | `SSH_FX_FILE_CORRUPT` |
| `29` | `SSH_FX_OWNER_INVALID` |
| `30` | `SSH_FX_GROUP_INVALID` |
| `31` | `SSH_FX_NO_MATCHING_BYTE_RANGE_LOCK` |

See `LastStatusMessage` for the server-provided message text.

Use each method's documented return value as the primary success test. Read this property immediately after a relevant SFTP failure when the server status provides additional detail.

### SFtp.LastStatusMessage

`Chilkat 11.7.0 · tcl · SFtp · LastStatusMessage · property · read-only · since 9.5.0.85`

```tcl
string
# ckStr is a CkString

CkSFtp_get_LastStatusMessage $this $ckStr

set strVal [CkSFtp_get_lastStatusMessage $this]
```

Contains the message text from the most recently received SFTP `SSH_FXP_STATUS` response. The wording is server-dependent.

This property can remain unchanged across later successful methods that do not receive a new status response. See `LastStatusCode` for the numeric code.

### SFtp.MaxPacketSize

`Chilkat 11.7.0 · tcl · SFtp · MaxPacketSize · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_MaxPacketSize $this]

CkSFtp_put_MaxPacketSize $this $intVal
```

Specifies the maximum packet length used by the underlying SSH transport. The default is `32768` bytes.

Normally this property should remain unchanged.

### SFtp.PasswordChangeRequested

`Chilkat 11.7.0 · tcl · SFtp · PasswordChangeRequested · property · read-only`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_PasswordChangeRequested $this]
```

Indicates that the server rejected password authentication because the account password must be changed. This property is set by `AuthenticatePw` and `AuthenticatePwPk`.

When `1`, call the authentication method again and pass the old and new passwords in this form:

```
|oldPassword|newPassword|
```

### SFtp.PreferIpv6

`Chilkat 11.7.0 · tcl · SFtp · PreferIpv6 · property · read/write`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_PreferIpv6 $this]

CkSFtp_put_PreferIpv6 $this $boolVal
```

Controls the preferred address family when DNS resolution returns both IPv4 and IPv6 addresses. The default is `0`, which prefers IPv4. Set it to `1` to prefer IPv6.

### SFtp.PreserveDate

`Chilkat 11.7.0 · tcl · SFtp · PreserveDate · property · read/write`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_PreserveDate $this]

CkSFtp_put_PreserveDate $this $boolVal
```

Controls whether path-based upload and download methods preserve source timestamps on the destination. The default is `0`.

Last-modified time is preserved when supported by the negotiated SFTP version and destination filesystem. SFTP v3 represents these times with whole-second precision and does not provide a creation-time attribute; creation-time preservation requires a later protocol version and server support.

This property does not apply to low-level transfers performed by opening a remote handle, reading or writing the data, and then closing the handle.

### SFtp.ProtocolVersion

`Chilkat 11.7.0 · tcl · SFtp · ProtocolVersion · property · read-only`

```tcl
integer
set intVal [CkSFtp_get_ProtocolVersion $this]
```

Contains the SFTP protocol version negotiated by `InitializeSftp`, normally a value from `3` through `6`.

Chilkat and the server exchange their highest supported versions, and the session uses the lower compatible version. Features unavailable in older versions are identified throughout this reference documentation.

The initial value is `0`. After a successful initialization, the negotiated value can remain populated after `Disconnect` and during a later connection before SFTP is initialized again. Do not use this property alone to determine whether an SFTP channel is currently open.

### SFtp.ReadDirMustMatch

`Chilkat 11.7.0 · tcl · SFtp · ReadDirMustMatch · property · read/write · since 9.5.0.53`

```tcl
string
# ckStr is a CkString

CkSFtp_get_ReadDirMustMatch $this $ckStr

set strVal [CkSFtp_get_readDirMustMatch $this]

CkSFtp_put_ReadDirMustMatch $this $strVal
```

Specifies a semicolon-separated list of filename patterns. When nonempty, `ReadDir` and `ReadDirListing` include only entries matching at least one pattern.

- `*` matches zero or more characters.
- Matching is case-insensitive.
- `?` and bracket expressions such as `[0-9]` are not wildcard operators.
- Surrounding whitespace and empty entries between semicolons are ignored.

```
*.xml; *.txt; *.csv
```

### SFtp.ReadDirMustNotMatch

`Chilkat 11.7.0 · tcl · SFtp · ReadDirMustNotMatch · property · read/write · since 9.5.0.53`

```tcl
string
# ckStr is a CkString

CkSFtp_get_ReadDirMustNotMatch $this $ckStr

set strVal [CkSFtp_get_readDirMustNotMatch $this]

CkSFtp_put_ReadDirMustNotMatch $this $strVal
```

Specifies a semicolon-separated list of filename patterns. When nonempty, `ReadDir` and `ReadDirListing` exclude entries matching any pattern. Exclusion is applied after `ReadDirMustMatch`.

- `*` matches zero or more characters.
- Matching is case-insensitive.
- `?` and bracket expressions such as `[0-9]` are not wildcard operators.
- Surrounding whitespace and empty entries between semicolons are ignored.

```
*.tmp; *.bak; *.log
```

### SFtp.ServerIdentifier

`Chilkat 11.7.0 · tcl · SFtp · ServerIdentifier · property · read-only · since 9.5.0.71`

```tcl
string
# ckStr is a CkString

CkSFtp_get_ServerIdentifier $this $ckStr

set strVal [CkSFtp_get_serverIdentifier $this]
```

Contains the SSH server-identification string received during connection establishment. For example:

```
SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.16
```

The last received identifier can remain populated after `Disconnect`. Use `IsConnected` to determine whether the SSH transport is currently connected.

### SFtp.SessionLog

`Chilkat 11.7.0 · tcl · SFtp · SessionLog · property · read-only`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SessionLog $this $ckStr

set strVal [CkSFtp_get_sessionLog $this]
```

Contains the in-memory SSH/SFTP protocol log. Enable logging by setting `KeepSessionLog` to `1`.

This property contains log text, not a file path. Call `ClearSessionLog` to clear it.

### SFtp.SocksHostname

`Chilkat 11.7.0 · tcl · SFtp · SocksHostname · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SocksHostname $this $ckStr

set strVal [CkSFtp_get_socksHostname $this]

CkSFtp_put_SocksHostname $this $strVal
```

Specifies the SOCKS proxy hostname or IPv4 address. This property is used only when `SocksVersion` is `4` or `5`.

### SFtp.SocksPassword

`Chilkat 11.7.0 · tcl · SFtp · SocksPassword · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SocksPassword $this $ckStr

set strVal [CkSFtp_get_socksPassword $this]

CkSFtp_put_SocksPassword $this $strVal
```

Specifies the SOCKS5 password when username/password authentication is required. SOCKS4 does not use a password, so this property is ignored when `SocksVersion` is `4`.

### SFtp.SocksPort

`Chilkat 11.7.0 · tcl · SFtp · SocksPort · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_SocksPort $this]

CkSFtp_put_SocksPort $this $intVal
```

Specifies the SOCKS proxy port. The default is `1080`. This property is used only when `SocksVersion` is `4` or `5`.

### SFtp.SocksUsername

`Chilkat 11.7.0 · tcl · SFtp · SocksUsername · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SocksUsername $this $ckStr

set strVal [CkSFtp_get_socksUsername $this]

CkSFtp_put_SocksUsername $this $strVal
```

Specifies the SOCKS proxy username. For SOCKS4 it is sent as the user ID; for SOCKS5 it is used with `SocksPassword` for username/password authentication.

### SFtp.SocksVersion

`Chilkat 11.7.0 · tcl · SFtp · SocksVersion · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_SocksVersion $this]

CkSFtp_put_SocksVersion $this $intVal
```

Selects whether and how a SOCKS proxy is used.

| Value | Behavior |
| :--- | :--- |
| `0` | Do not use a SOCKS proxy. This is the default. |
| `4` | Connect through a SOCKS4 proxy. |
| `5` | Connect through a SOCKS5 proxy. |

### SFtp.SoRcvBuf

`Chilkat 11.7.0 · tcl · SFtp · SoRcvBuf · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_SoRcvBuf $this]

CkSFtp_put_SoRcvBuf $this $intVal
```

Specifies the socket receive-buffer size. The default is `4194304` bytes. Normally this property should remain unchanged.

When download throughput is unexpectedly low, testing a larger value may help. Values should generally be multiples of `4096`.

See also:

- [More Information about TCP performance and Buffer Sizes](http://www.cknotes.com/?p=446)

### SFtp.SoSndBuf

`Chilkat 11.7.0 · tcl · SFtp · SoSndBuf · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_SoSndBuf $this]

CkSFtp_put_SoSndBuf $this $intVal
```

Specifies the socket send-buffer size. The default is `262144` bytes. Normally this property should remain unchanged.

When upload throughput is unexpectedly low, testing values such as `524288` or `1048576` may help. Values should generally be multiples of `4096`.

See also:

- [More Information about TCP performance and Buffer Sizes](http://www.cknotes.com/?p=446)

### SFtp.SyncCreateAllLocalDirs

`Chilkat 11.7.0 · tcl · SFtp · SyncCreateAllLocalDirs · property · read/write · since 9.5.0.76`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_SyncCreateAllLocalDirs $this]

CkSFtp_put_SyncCreateAllLocalDirs $this $boolVal
```

Controls whether `SyncTreeDownload` creates empty remote directories locally. The default is `1`.

When `0`, a local directory is created only when it is needed to contain a downloaded file.

When `1`, an empty remote directory is created locally even when no file beneath it is downloaded.

### SFtp.SyncDirectives

`Chilkat 11.7.0 · tcl · SFtp · SyncDirectives · property · read/write · since 9.5.0.58`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SyncDirectives $this $ckStr

set strVal [CkSFtp_get_syncDirectives $this]

CkSFtp_put_SyncDirectives $this $strVal
```

Specifies comma-separated directives that modify `SyncTreeUpload` or `SyncTreeDownload`. The default is an empty string.

| Directive | Effect |
| :--- | :--- |
| `UploadIgnoreLocalOpenFailures` | During upload synchronization, skip local files that cannot be opened, such as files held with exclusive access by another process. |

### SFtp.SyncMustMatch

`Chilkat 11.7.0 · tcl · SFtp · SyncMustMatch · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SyncMustMatch $this $ckStr

set strVal [CkSFtp_get_syncMustMatch $this]

CkSFtp_put_SyncMustMatch $this $strVal
```

Specifies a semicolon-separated list of wildcard filename patterns. `SyncTreeUpload` and `SyncTreeDownload` transfer only files matching at least one pattern.

This filter applies to filenames, not directory names encountered while recursively traversing a tree.

```
*.xml;*.txt;*.csv
```

Use `*` to match zero or more characters. Separate multiple patterns with semicolons.

### SFtp.SyncMustMatchDir

`Chilkat 11.7.0 · tcl · SFtp · SyncMustMatchDir · property · read/write · since 9.5.0.76`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SyncMustMatchDir $this $ckStr

set strVal [CkSFtp_get_syncMustMatchDir $this]

CkSFtp_put_SyncMustMatchDir $this $strVal
```

Specifies a semicolon-separated list of wildcard directory-name patterns. `SyncTreeUpload` and `SyncTreeDownload` enter only directories matching at least one pattern.

```
xml;txt;data_*
```

Use `*` to match zero or more characters. Separate multiple patterns with semicolons.

### SFtp.SyncMustNotMatch

`Chilkat 11.7.0 · tcl · SFtp · SyncMustNotMatch · property · read/write`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SyncMustNotMatch $this $ckStr

set strVal [CkSFtp_get_syncMustNotMatch $this]

CkSFtp_put_SyncMustNotMatch $this $strVal
```

Specifies a semicolon-separated list of wildcard filename patterns. `SyncTreeUpload` and `SyncTreeDownload` skip files matching any pattern.

This filter applies to filenames, not directory names encountered while recursively traversing a tree.

```
*.tmp;*.bak;*.log
```

Use `*` to match zero or more characters. Separate multiple patterns with semicolons.

### SFtp.SyncMustNotMatchDir

`Chilkat 11.7.0 · tcl · SFtp · SyncMustNotMatchDir · property · read/write · since 9.5.0.76`

```tcl
string
# ckStr is a CkString

CkSFtp_get_SyncMustNotMatchDir $this $ckStr

set strVal [CkSFtp_get_syncMustNotMatchDir $this]

CkSFtp_put_SyncMustNotMatchDir $this $strVal
```

Specifies a semicolon-separated list of wildcard directory-name patterns. `SyncTreeUpload` and `SyncTreeDownload` skip directories matching any pattern.

```
temp;cache;archive_*
```

Use `*` to match zero or more characters. Separate multiple patterns with semicolons.

### SFtp.TcpNoDelay

`Chilkat 11.7.0 · tcl · SFtp · TcpNoDelay · property · read/write`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_TcpNoDelay $this]

CkSFtp_put_TcpNoDelay $this $boolVal
```

Controls the `TCP_NODELAY` socket option. The default is `0`. Set it to `1` to disable the Nagle algorithm and reduce delays when many small packets are sent.

### SFtp.UncommonOptions

`Chilkat 11.7.0 · tcl · SFtp · UncommonOptions · property · read/write · since 9.5.0.73`

```tcl
string
# ckStr is a CkString

CkSFtp_get_UncommonOptions $this $ckStr

set strVal [CkSFtp_get_uncommonOptions $this]

CkSFtp_put_UncommonOptions $this $strVal
```

Provides comma-separated compatibility, security, and synchronization options for uncommon scenarios. The default is an empty string and is appropriate for most applications.

| Keyword | Effect |
| :--- | :--- |
| `ForceUserAuthRsaSha1` | Force legacy `ssh-rsa`/SHA-1 signatures for RSA user authentication. Set before connecting. |
| `ProtectFromVpn` | On Android, bypass an installed or active VPN. |
| `NoSyncDownloadEmptyFiles` | Prevent empty files from being downloaded by `SyncTreeDownload`. |
| `no-weak-mac-algs` | Remove weaker SHA-1, MD5, and RIPEMD-160 MAC algorithms from the offered list. |
| `+ssh-hmac-etm` | Re-enable OpenSSH Encrypt-then-MAC algorithms disabled by default as a Terrapin mitigation. |
| `+chacha20-poly1305@openssh.com` | Re-enable `chacha20-poly1305@openssh.com`, disabled by default as a Terrapin mitigation. |

### SFtp.UploadChunkSize

`Chilkat 11.7.0 · tcl · SFtp · UploadChunkSize · property · read/write`

```tcl
integer
set intVal [CkSFtp_get_UploadChunkSize $this]

CkSFtp_put_UploadChunkSize $this $intVal
```

Specifies the chunk size, in bytes, used by `UploadFile` and `UploadFileByName`. The default is `32000`.

If an upload fails because the local operating system aborts the connection, try a smaller value such as `4096`. Smaller chunks can reduce throughput.

### SFtp.UserAuthBanner

`Chilkat 11.7.0 · tcl · SFtp · UserAuthBanner · property · read/write · since 9.5.0.88`

```tcl
string
# ckStr is a CkString

CkSFtp_get_UserAuthBanner $this $ckStr

set strVal [CkSFtp_get_userAuthBanner $this]

CkSFtp_put_UserAuthBanner $this $strVal
```

Contains a user-authentication banner received from the server. Check this property after `StartKeyboardAuth` or another authentication attempt and display it to the user when appropriate.

When no banner is available, the property returns an empty string.

### SFtp.UtcMode

`Chilkat 11.7.0 · tcl · SFtp · UtcMode · property · read/write`

```tcl
boolean 1/0
set boolVal [CkSFtp_get_UtcMode $this]

CkSFtp_put_UtcMode $this $boolVal
```

Controls the time zone used by date/time getters. When `1`, returned values are expressed in UTC. When `0` (the default), returned values are converted to the local time zone.

```
UtcMode = 0: Fri, 21 Nov 1997 09:55:06 -0600
UtcMode = 1:  Fri, 21 Nov 1997 15:55:06 GMT
```

### SFtp.XferByteCount

`Chilkat 11.7.0 · tcl · SFtp · XferByteCount · property · read-only · since 9.5.0.71`

```tcl
unsigned integer
set intVal [CkSFtp_get_XferByteCount $this]
```

Contains the current transfer byte count for an upload or download in progress. An application can read this property while an asynchronous transfer is running.

For `SyncTreeUpload` and `SyncTreeDownload`, the value is cumulative across all files processed by the operation. Use `XferByteCount64` when a 64-bit count is required.

### SFtp.XferByteCount64

`Chilkat 11.7.0 · tcl · SFtp · XferByteCount64 · property · read-only · since 9.5.0.71`

```tcl
(64-bit integer)
set int64Val [CkSFtp_get_XferByteCount64 $this]
```

Contains the current 64-bit transfer byte count for an upload or download in progress. An application can read this property while an asynchronous transfer is running.

For `SyncTreeUpload` and `SyncTreeDownload`, the value is cumulative across all files processed by the operation.

## Methods

### SFtp.AuthenticatePk

`Chilkat 11.7.0 · tcl · SFtp · AuthenticatePk · method`

```tcl
# username is a string

# privateKey is a CkSshKey

set status [CkSFtp_AuthenticatePk $this $username  $privateKey]
```

Authenticates the connected SSH session using public-key authentication. `username` identifies the server account, and `privateKey` must contain the corresponding private key. The matching public key must already be authorized for that account on the server.

Call `Connect` first. After a failure, inspect `AuthFailReason` and `LastErrorText`.

Returns 1 for success, 0 for failure.

Async variant: `AuthenticatePkAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.AuthenticatePw

`Chilkat 11.7.0 · tcl · SFtp · AuthenticatePw · method`

```tcl
# login is a string

# password is a string

set status [CkSFtp_AuthenticatePw $this $login  $password]
```

Authenticates the connected SSH session using `login` and `password`.

```
1. Connect
2. AuthenticatePw or AuthenticatePk
3. InitializeSftp
```

If the server requests a password change, see `PasswordChangeRequested`. After a failure, inspect `AuthFailReason` and `LastErrorText`.

A rejected password does not necessarily close the SSH connection. The application may retry authentication on the same connected session. After a later success, an older `AuthFailReason` value can remain populated.

Returns 1 for success, 0 for failure.

Async variant: `AuthenticatePwAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.AuthenticatePwPk

`Chilkat 11.7.0 · tcl · SFtp · AuthenticatePwPk · method`

```tcl
# username is a string

# password is a string

# privateKey is a CkSshKey

set status [CkSFtp_AuthenticatePwPk $this $username  $password  $privateKey]
```

Authenticates with a server that requires both a password and a private key. `username` identifies the account, `password` supplies the password, and `privateKey` supplies the private key.

Most servers require either password or public-key authentication rather than both. After a failure, inspect `AuthFailReason` and `LastErrorText`.

Returns 1 for success, 0 for failure.

Async variant: `AuthenticatePwPkAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.AuthenticateSecPw

`Chilkat 11.7.0 · tcl · SFtp · AuthenticateSecPw · method · since 9.5.0.71`

```tcl
# login is a CkSecureString

# password is a CkSecureString

set status [CkSFtp_AuthenticateSecPw $this $login  $password]
```

Works like `AuthenticatePw`, but receives `login` and `password` in `SecureString` objects.

Returns 1 for success, 0 for failure.

Async variant: `AuthenticateSecPwAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.AuthenticateSecPwPk

`Chilkat 11.7.0 · tcl · SFtp · AuthenticateSecPwPk · method · since 9.5.0.71`

```tcl
# username is a CkSecureString

# password is a CkSecureString

# privateKey is a CkSshKey

set status [CkSFtp_AuthenticateSecPwPk $this $username  $password  $privateKey]
```

Works like `AuthenticatePwPk`, but receives `username` and `password` in `SecureString` objects. `privateKey` supplies the private key.

Returns 1 for success, 0 for failure.

Async variant: `AuthenticateSecPwPkAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ClearCache

`Chilkat 11.7.0 · tcl · SFtp · ClearCache · method`

```tcl
CkSFtp_ClearCache $this
```

Clears the internal remote file-attribute cache used when `EnableCache` is `1`.

### SFtp.ClearSessionLog

`Chilkat 11.7.0 · tcl · SFtp · ClearSessionLog · method`

```tcl
CkSFtp_ClearSessionLog $this
```

Clears the in-memory text stored in `SessionLog`.

### SFtp.CloseHandle

`Chilkat 11.7.0 · tcl · SFtp · CloseHandle · method`

```tcl
# handle is a string

set status [CkSFtp_CloseHandle $this $handle]
```

Closes the remote file or directory handle specified by `handle`. The handle must have been returned by `OpenFile` or `OpenDir`.

Handles are specific to one initialized SFTP session. Close each handle exactly once. Closing an empty, invalid, or already-closed handle returns `0`. A handle must never be reused after disconnecting or replacing the connection.

Returns 1 for success, 0 for failure.

Async variant: `CloseHandleAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.Connect

`Chilkat 11.7.0 · tcl · SFtp · Connect · method`

```tcl
# domainName is a string

# port is an integer

set status [CkSFtp_Connect $this $domainName  $port]
```

Establishes an SSH connection to `domainName` on TCP port `port`. The host may be a DNS name or numeric IPv4 or IPv6 address; SSH servers commonly listen on port `22`.

A successful connection establishes the SSH transport only. Next call an authentication method, then call `InitializeSftp`.

```
1. Connect
2. AuthenticatePw, AuthenticatePk, or another authentication method
3. InitializeSftp
4. Perform SFTP operations
```

**Supported negotiation algorithms include:**

| Category | Algorithms |
| :--- | :--- |
| Host key | `ssh-ed25519`, `rsa-sha2-256`, `rsa-sha2-512`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, `ecdsa-sha2-nistp521`, `ssh-rsa`, `ssh-dss` |
| Key exchange | `curve25519-sha256`, `curve25519-sha256@libssh.org`, NIST ECDH, Diffie-Hellman group 1/14/16/18, and group-exchange SHA-1/SHA-256 |
| Ciphers | AES CTR/CBC/GCM, Twofish CBC, Blowfish CBC, and optionally `chacha20-poly1305@openssh.com` |
| MAC | SHA-2, SHA-1, RIPEMD-160, MD5, and optionally OpenSSH Encrypt-then-MAC variants |
| Compression | `none`, `zlib`, and `zlib@openssh.com` |

Connection failures can occur before SSH negotiation because of firewalls, endpoint security, routing, network ACLs, proxy configuration, or server policy.

**Calling while connected:** A new successful `Connect` replaces the existing SSH connection. The previous SFTP subsystem and all handles from it are no longer usable. Authenticate and call `InitializeSftp` for the new connection.

Returns 1 for success, 0 for failure.

Async variant: `ConnectAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ConnectThroughSsh

`Chilkat 11.7.0 · tcl · SFtp · ConnectThroughSsh · method · since 9.5.0.55`

```tcl
# sshConn is a CkSsh

# hostname is a string

# port is an integer

set status [CkSFtp_ConnectThroughSsh $this $sshConn  $hostname  $port]
```

Connects to `hostname` on `port` through the already connected and authenticated `Ssh` object in `sshConn`.

```
application  →  first SSH server  →  destination SSH/SFTP server
```

After this method succeeds, authenticate separately with the destination server and call `InitializeSftp`. All destination traffic is carried through the first SSH connection.

Returns 1 for success, 0 for failure.

Async variant: `ConnectThroughSshAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ContinueKeyboardAuth

`Chilkat 11.7.0 · tcl · SFtp · ContinueKeyboardAuth · method · since 9.5.0.88`

```tcl
# response is a string

# outStr is a CkString (output)

set status [CkSFtp_ContinueKeyboardAuth $this $response $outStr]

set retStr [CkSFtp_continueKeyboardAuth $this $response]
```

Continues keyboard-interactive authentication by submitting `response` for the prompts returned by `StartKeyboardAuth`.

For a single prompt, pass the response text directly. For multiple prompts, pass XML in this form:

```
<response>
  <response1>response to first prompt</response1>
  <response2>response to second prompt</response2>
  ...
</response>
```

The returned XML indicates authentication success, authentication failure, or another `infoRequest` containing additional prompts.

```
<success>success message</success>

<error>error message</error>
```

Returns 1 for success, 0 for failure.

Async variant: `ContinueKeyboardAuthAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.CopyFileAttr

`Chilkat 11.7.0 · tcl · SFtp · CopyFileAttr · method`

```tcl
# localFilename is a string

# remoteFilename is a string

# isHandle is a boolean

set status [CkSFtp_CopyFileAttr $this $localFilename  $remoteFilename  $isHandle]
```

Copies supported timestamps and attributes from the local file at `localFilename` to the remote item identified by `remoteFilename`.

Set `isHandle` to `1` when `remoteFilename` contains an open SFTP handle; otherwise set it to `0` for a remote path.

| Negotiated SFTP version | Attributes copied |
| :--- | :--- |
| SFTP v3 and earlier | Last-modified time and last-access time |
| SFTP v4 and v5 | Last-modified time, last-access time, and creation time |
| SFTP v6 and later | The preceding timestamps plus read-only, hidden, archive, compressed, and encrypted flags |

The remote server and filesystem determine whether all requested attributes can be applied. Last-access time may change when the server accesses the file, and compressed or encrypted flags may not have the same effect on every server.

Returns 1 for success, 0 for failure.

Async variant: `CopyFileAttrAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.CreateDir

`Chilkat 11.7.0 · tcl · SFtp · CreateDir · method`

```tcl
# path is a string

set status [CkSFtp_CreateDir $this $path]
```

Creates the remote directory specified by `path`. Parent directories are not necessarily created automatically.

Returns 1 for success, 0 for failure.

Async variant: `CreateDirAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.Disconnect

`Chilkat 11.7.0 · tcl · SFtp · Disconnect · method`

```tcl
CkSFtp_Disconnect $this
```

Closes the current SSH/SFTP connection. All remote file and directory handles from that session become invalid and must not be reused.

The object remains reusable. A later session must call `Connect`, authenticate again, and call `InitializeSftp` before performing SFTP operations.

Some properties retain values from the previous session after disconnect, including the negotiated protocol version, server identifier, and last SFTP status. Treat these as historical values rather than evidence of a live session.

### SFtp.DownloadBd

`Chilkat 11.7.0 · tcl · SFtp · DownloadBd · method · since 9.5.0.62`

```tcl
# remoteFilePath is a string

# binData is a CkBinData

set status [CkSFtp_DownloadBd $this $remoteFilePath  $binData]
```

Downloads the remote file at `remoteFilePath` and appends its bytes to `binData`.

Existing data in `binData` is preserved. Clear it first when replacement rather than append behavior is required.

Returns 1 for success, 0 for failure.

Async variant: `DownloadBdAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.DownloadFile

`Chilkat 11.7.0 · tcl · SFtp · DownloadFile · method`

```tcl
# handle is a string

# toFilename is a string

set status [CkSFtp_DownloadFile $this $handle  $toFilename]
```

Streams the remote file identified by `handle` to the local filesystem path `toFilename`. The handle must have been returned by `OpenFile`.

The transfer is streamed and is not limited by available memory. Close the remote handle when the download is complete.

This method downloads the entire remote file beginning at byte offset `0`. It does not begin at the handle's current sequential read position.

Returns 1 for success, 0 for failure.

Async variant: `DownloadFileAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.DownloadFileByName

`Chilkat 11.7.0 · tcl · SFtp · DownloadFileByName · method`

```tcl
# remoteFilePath is a string

# localFilePath is a string

set status [CkSFtp_DownloadFileByName $this $remoteFilePath  $localFilePath]
```

Downloads the remote file at `remoteFilePath` to the local filesystem path `localFilePath`.

When `PreserveDate` is `1`, Chilkat preserves the remote file's last-modified time.

An absolute remote path begins with `/` and is relative to the server filesystem root. A relative path is interpreted relative to the authenticated user's home directory.

If the local destination file exists, it is truncated before the download.

Returns 1 for success, 0 for failure.

Async variant: `DownloadFileByNameAsync` — same arguments, returns a `Task` (see Async variants below).

See also:

- [Understanding SFTP Absolute FilePaths](http://www.cknotes.com/?p=135)

### SFtp.DownloadSb

`Chilkat 11.7.0 · tcl · SFtp · DownloadSb · method · since 9.5.0.62`

```tcl
# remoteFilePath is a string

# charset is a string

# sb is a CkStringBuilder

set status [CkSFtp_DownloadSb $this $remoteFilePath  $charset  $sb]
```

Downloads the remote file at `remoteFilePath`, decodes it using `charset`, and appends the text to `sb`.

Existing text in `sb` is preserved. Clear it first when replacement rather than append behavior is required.

Returns 1 for success, 0 for failure.

Async variant: `DownloadSbAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.Eof

`Chilkat 11.7.0 · tcl · SFtp · Eof · method`

```tcl
# handle is a string

set retBool [CkSFtp_Eof $this $handle]
```

Returns `1` when the most recent read for `handle` received the SFTP end-of-file status.

Reading exactly through the final byte does not set EOF immediately. The next read returns successfully with zero bytes, sets `LastStatusCode` to `SSH_FX_EOF`, and causes this method to return `1`.

An empty, malformed, or already-closed handle can also cause this method to return `1`. Use `LastReadFailed` and the read method's result to distinguish a normal EOF from a handle or read failure.

### SFtp.FileExists

`Chilkat 11.7.0 · tcl · SFtp · FileExists · method · since 9.5.0.67`

```tcl
# remotePath is a string

# followLinks is a boolean

set retInt [CkSFtp_FileExists $this $remotePath  $followLinks]
```

Checks the remote item at `remotePath`. When `followLinks` is `1`, a symbolic link is followed and the target type is returned.

| Return value | Meaning |
| :--- | :--- |
| `-1` | Unable to determine the result. Inspect `LastErrorText`. |
| `0` | The path does not exist. |
| `1` | A regular file exists. |
| `2` | A directory exists. |
| `3` | A symbolic link exists. This is possible only when `followLinks` is `0`. |
| `4` | A special filesystem entry exists. |
| `5` | An entry of unknown type exists. |
| `6` | A socket exists. |
| `7` | A character device exists. |
| `8` | A block device exists. |
| `9` | A FIFO exists. |

Positive values correspond to SFTP filesystem entry types. Some types are platform-dependent.

For a dangling symbolic link, `followLinks = 0` returns `3` for the link itself, while `followLinks = 1` returns `0` because the target does not exist.

Async variant: `FileExistsAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.Fsync

`Chilkat 11.7.0 · tcl · SFtp · Fsync · method · since 9.5.0.71`

```tcl
# handle is a string

set status [CkSFtp_Fsync $this $handle]
```

Requests that the server flush pending data for the open file identified by `handle` to stable storage.

This method uses the OpenSSH `fsync@openssh.com` extension and succeeds only when the server supports that extension.

Returns 1 for success, 0 for failure.

Async variant: `FsyncAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFileCreateTimeStr

`Chilkat 11.7.0 · tcl · SFtp · GetFileCreateTimeStr · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

# outStr is a CkString (output)

set status [CkSFtp_GetFileCreateTimeStr $this $pathOrHandle  $bFollowLinks  $bIsHandle $outStr]

set retStr [CkSFtp_getFileCreateTimeStr $this $pathOrHandle $bFollowLinks $bIsHandle]
```

Returns the remote file's creation date and time. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path.

When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

SFTP v3 and earlier do not provide a file creation time.

The result is an RFC 822 formatted string, for example `Fri, 21 Nov 1997 09:55:06 -0600`.

Returns 1 for success, 0 for failure.

Async variant: `GetFileCreateTimeStrAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFileGroup

`Chilkat 11.7.0 · tcl · SFtp · GetFileGroup · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

# outStr is a CkString (output)

set status [CkSFtp_GetFileGroup $this $pathOrHandle  $bFollowLinks  $bIsHandle $outStr]

set retStr [CkSFtp_getFileGroup $this $pathOrHandle $bFollowLinks $bIsHandle]
```

Returns the remote file's group ownership. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path.

When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

With SFTP v3 and earlier, the result is the decimal numeric GID because textual group names are not supported.

Returns 1 for success, 0 for failure.

Async variant: `GetFileGroupAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFileLastAccessStr

`Chilkat 11.7.0 · tcl · SFtp · GetFileLastAccessStr · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

# outStr is a CkString (output)

set status [CkSFtp_GetFileLastAccessStr $this $pathOrHandle  $bFollowLinks  $bIsHandle $outStr]

set retStr [CkSFtp_getFileLastAccessStr $this $pathOrHandle $bFollowLinks $bIsHandle]
```

Returns the remote file's last-access date and time. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path.

When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

The result is an RFC 822 formatted string, for example `Fri, 21 Nov 1997 09:55:06 -0600`.

Returns 1 for success, 0 for failure.

Async variant: `GetFileLastAccessStrAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFileLastModifiedStr

`Chilkat 11.7.0 · tcl · SFtp · GetFileLastModifiedStr · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

# outStr is a CkString (output)

set status [CkSFtp_GetFileLastModifiedStr $this $pathOrHandle  $bFollowLinks  $bIsHandle $outStr]

set retStr [CkSFtp_getFileLastModifiedStr $this $pathOrHandle $bFollowLinks $bIsHandle]
```

Returns the remote file's last-modified date and time. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path.

When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

The result is an RFC 822 formatted string, for example `Fri, 21 Nov 1997 09:55:06 -0600`.

Returns 1 for success, 0 for failure.

Async variant: `GetFileLastModifiedStrAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFileOwner

`Chilkat 11.7.0 · tcl · SFtp · GetFileOwner · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

# outStr is a CkString (output)

set status [CkSFtp_GetFileOwner $this $pathOrHandle  $bFollowLinks  $bIsHandle $outStr]

set retStr [CkSFtp_getFileOwner $this $pathOrHandle $bFollowLinks $bIsHandle]
```

Returns the remote file's owner. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path.

When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

With SFTP v3 and earlier, the result is the decimal numeric UID because textual owner names are not supported.

Returns 1 for success, 0 for failure.

Async variant: `GetFileOwnerAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFilePermissions

`Chilkat 11.7.0 · tcl · SFtp · GetFilePermissions · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set retInt [CkSFtp_GetFilePermissions $this $pathOrHandle  $bFollowLinks  $bIsHandle]
```

Returns the remote item's complete POSIX mode value. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path. When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

The returned integer includes both the file-type bits and permission bits. For example:

```
Regular file, mode 0664: octal 0100664, decimal 33204
Regular file, mode 0600: octal 0100600, decimal 33152
Regular file, mode 0644: octal 0100644, decimal 33188
```

Mask with octal `07777` to obtain permission and special bits, or `0777` for only the traditional owner/group/other read, write, and execute bits. See `SetPermissions` to change the permissions.

Async variant: `GetFilePermissionsAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFileSize32

`Chilkat 11.7.0 · tcl · SFtp · GetFileSize32 · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set retInt [CkSFtp_GetFileSize32 $this $pathOrHandle  $bFollowLinks  $bIsHandle]
```

Returns the remote file's size in bytes as a 32-bit integer. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path.

When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

Returns `-1` when the size cannot be represented as a 32-bit integer. Use `GetFileSize64` or `GetFileSizeStr` for large files.

Async variant: `GetFileSize32Async` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFileSize64

`Chilkat 11.7.0 · tcl · SFtp · GetFileSize64 · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set retInt64 [CkSFtp_GetFileSize64 $this $pathOrHandle  $bFollowLinks  $bIsHandle]
```

Returns the remote file's size in bytes as a 64-bit integer. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path.

When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

Async variant: `GetFileSize64Async` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetFileSizeStr

`Chilkat 11.7.0 · tcl · SFtp · GetFileSizeStr · method`

```tcl
# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

# outStr is a CkString (output)

set status [CkSFtp_GetFileSizeStr $this $pathOrHandle  $bFollowLinks  $bIsHandle $outStr]

set retStr [CkSFtp_getFileSizeStr $this $pathOrHandle $bFollowLinks $bIsHandle]
```

Returns the remote file's size in bytes as a decimal string. `pathOrHandle` may contain a remote path or a handle returned by `OpenFile`. Set `bIsHandle` to `1` for a handle and `0` for a path.

When `bFollowLinks` is `1`, the server follows a symbolic link and returns metadata for its target.

Returns 1 for success, 0 for failure.

Async variant: `GetFileSizeStrAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.GetHostKeyFP

`Chilkat 11.7.0 · tcl · SFtp · GetHostKeyFP · method · since 9.5.0.92`

```tcl
# hashAlg is a string

# includeKeyType is a boolean

# includeHashName is a boolean

# outStr is a CkString (output)

set status [CkSFtp_GetHostKeyFP $this $hashAlg  $includeKeyType  $includeHashName $outStr]

set retStr [CkSFtp_getHostKeyFP $this $hashAlg $includeKeyType $includeHashName]
```

Returns the connected server's host-key fingerprint using `hashAlg`. Common choices include `SHA256`, `SHA384`, `SHA512`, `SHA1`, and `MD5`.

| includeKeyType | includeHashName | Example format |
| :--- | :--- | :--- |
| `1` | `1` | `ssh-rsa SHA256:L7sQgnpnoBwRoyIYXAFBs8SdSnwtyYmhXs1p/mQDK...` |
| `1` | `0` | `ssh-rsa L7sQgnpnoBwRoyIYXAFBs8SdSnwtyYmhXs1p/mQDK...` |
| `0` | `1` | `SHA256:L7sQgnpnoBwRoyIYXAFBs8SdSnwtyYmhXs1p/mQDK...` |
| `0` | `0` | `L7sQgnpnoBwRoyIYXAFBs8SdSnwtyYmhXs1p/mQDK...` |

For server identity verification, compare a SHA-256 fingerprint with a value obtained from a trusted source before sending credentials.

Returns 1 for success, 0 for failure.

### SFtp.GetLastJsonData

`Chilkat 11.7.0 · tcl · SFtp · GetLastJsonData · method · since 11.0.0`

```tcl
# json is a CkJsonObject

CkSFtp_GetLastJsonData $this $json
```

Populates `json` with supplemental details produced by the most recent method when such details are available. Many methods do not produce additional JSON information.

### SFtp.GetSyncedFiles

`Chilkat 11.7.0 · tcl · SFtp · GetSyncedFiles · method · since 10.0.0`

```tcl
# strTab is a CkStringTable

CkSFtp_GetSyncedFiles $this $strTab
```

Appends to `strTab` the relative paths processed by the most recent `SyncTreeUpload` or `SyncTreeDownload` operation.

For downloads, entries can include local directories that were created. Directory paths end with `/` so they can be distinguished from file paths.

Existing entries in `strTab` are preserved.

Clear `strTab` first when only the latest synchronization results are wanted. Downloaded directory entries are reported with a trailing `/`; uploaded directory entries are reported without one.

### SFtp.HardLink

`Chilkat 11.7.0 · tcl · SFtp · HardLink · method · since 9.5.0.71`

```tcl
# oldPath is a string

# newPath is a string

set status [CkSFtp_HardLink $this $oldPath  $newPath]
```

Creates a hard link from `newPath` to the existing remote file at `oldPath`.

This method uses the OpenSSH `hardlink@openssh.com` extension and succeeds only when the server supports that extension.

A successful hard link refers to the same underlying file. Modifying the existing file through either path changes the content observed through the other path.

Returns 1 for success, 0 for failure.

Async variant: `HardLinkAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.InitializeSftp

`Chilkat 11.7.0 · tcl · SFtp · InitializeSftp · method`

```tcl
set status [CkSFtp_InitializeSftp $this]
```

Opens the SFTP subsystem and negotiates the SFTP protocol version. Call this method after connecting and authenticating.

```
1. Connect
2. AuthenticatePw, AuthenticatePk, or another authentication method
3. InitializeSftp
```

After success, read `ProtocolVersion` to determine the negotiated SFTP version.

If opening the SFTP channel fails, inspect `InitializeFailCode`, `InitializeFailReason`, and `LastErrorText`.

Call this method only once for a given SSH connection. A second call on the same connection returns `0`. After disconnecting or replacing the connection, authenticate the new connection and call this method again.

Returns 1 for success, 0 for failure.

Async variant: `InitializeSftpAsync` — same arguments, returns a `Task` (see Async variants below).

See also:

- [Error Explained: Received FAILURE response to subsystem request.](http://www.cknotes.com/?p=250)

### SFtp.LastReadFailed

`Chilkat 11.7.0 · tcl · SFtp · LastReadFailed · method`

```tcl
# handle is a string

set retBool [CkSFtp_LastReadFailed $this $handle]
```

Returns `1` if the most recent read associated with `handle` failed; otherwise returns `0`.

A normal end-of-file is not a read failure: the EOF read succeeds, returns zero bytes, and this method returns `0`. For an empty, malformed, or already-closed handle, this method returns `1`.

### SFtp.LastReadNumBytes

`Chilkat 11.7.0 · tcl · SFtp · LastReadNumBytes · method`

```tcl
# handle is a string

set retInt [CkSFtp_LastReadNumBytes $this $handle]
```

Returns the number of bytes received by the most recent read associated with `handle`.

The initial value for a newly opened handle is `0`. A normal EOF read and a failed read report `0`.

### SFtp.LoadTaskCaller

`Chilkat 11.7.0 · tcl · SFtp · LoadTaskCaller · method · since 9.5.0.80`

```tcl
# task is a CkTask

set status [CkSFtp_LoadTaskCaller $this $task]
```

Loads this object from the caller state associated with the completed asynchronous `task`.

Use the same object type that originally started the asynchronous operation.

Returns 1 for success, 0 for failure.

### SFtp.OpenDir

`Chilkat 11.7.0 · tcl · SFtp · OpenDir · method`

```tcl
# path is a string

# outStr is a CkString (output)

set status [CkSFtp_OpenDir $this $path $outStr]

set retStr [CkSFtp_openDir $this $path]
```

Opens the remote directory specified by `path` and returns a handle for reading its entries.

```
handle = OpenDir(path)
ReadDirListing(handle, dirObj)
CloseHandle(handle)
```

Remote paths use `/` as the separator. A path beginning with `/` is absolute; a relative path is interpreted relative to the authenticated user's home directory. An empty path refers to that default directory.

This method does not change a working directory. SFTP is not FTP and has no persistent current-directory command.

Returns 1 for success, 0 for failure.

Async variant: `OpenDirAsync` — same arguments, returns a `Task` (see Async variants below).

See also:

- [Understanding SFTP Absolute FilePaths](http://www.cknotes.com/?p=135)

### SFtp.OpenFile

`Chilkat 11.7.0 · tcl · SFtp · OpenFile · method`

```tcl
# remotePath is a string

# access is a string

# createDisposition is a string

# outStr is a CkString (output)

set status [CkSFtp_OpenFile $this $remotePath  $access  $createDisposition $outStr]

set retStr [CkSFtp_openFile $this $remotePath $access $createDisposition]
```

Opens or creates the remote file at `remotePath` and returns a handle for subsequent read or write operations. Close the handle with `CloseHandle` when finished.

`access` must be `readOnly`, `writeOnly`, or `readWrite`.

`createDisposition` is a comma-separated list. It must contain exactly one primary disposition:

| Primary disposition | Behavior |
| :--- | :--- |
| `createNew` | Create a new file; fail if it already exists. |
| `createTruncate` | Create a new file, or open and truncate an existing file. |
| `openExisting` | Open an existing file; fail if it does not exist. |
| `openOrCreate` | Open the file if it exists, otherwise create it. |
| `truncateExisting` | Open and truncate an existing file; fail if it does not exist. |

Additional optional keywords are:

| Option | Behavior |
| :--- | :--- |
| `appendData` | Write at the end of the file. Appends are not guaranteed to be atomic. |
| `appendDataAtomic` | Append atomically so concurrent appenders do not collide. SFTP v5 or later. |
| `textMode` | Request server text-mode processing and canonical newline conversion. SFTP v5 or later. |
| `blockRead` | Request exclusive read access. SFTP v5 or later. |
| `blockWrite` | Request exclusive write access. SFTP v5 or later. |
| `blockDelete` | Prevent deletion while the handle is open. SFTP v5 or later. |
| `blockAdvisory` | Make the requested block modes advisory. SFTP v5 or later. |
| `noFollow` | Fail if the final path component is a symbolic link. SFTP v5 or later. |
| `deleteOnClose` | Request deletion when the last handle is closed. SFTP v5 or later. |
| `accessAuditAlarmInfo` | Request privileges needed to read or write AUDIT or ALARM ACL entries. SFTP v5 or later. |
| `accessBackup` | Request backup/restore privileges that may bypass normal access checks. SFTP v5 or later. |
| `backupStream` | Read or write a server-specific backup stream. SFTP v5 or later. |

Options marked SFTP v5 or later require `ForceV3` to be `0` and a negotiated `ProtocolVersion` of at least `5`.

An absolute remote path begins with `/`. A relative path is interpreted from the authenticated user's home directory. Some servers require a filename in the home directory to be written as `./filename`.

**Use only documented values:** Some servers or Chilkat versions may tolerate an unknown access value, an unknown option, or conflicting primary dispositions, but the resulting behavior is unspecified. Supply one documented access value and exactly one primary disposition.

`appendData` forces writes to the end of the file, including explicit-offset writes. By itself it opens an existing file but does not create a missing file; combine it with an appropriate primary disposition when creation is required. Options defined for SFTP v5 or later must not be assumed to take effect when an older version is negotiated, even if the open request succeeds.

Returns 1 for success, 0 for failure.

Async variant: `OpenFileAsync` — same arguments, returns a `Task` (see Async variants below).

See also:

- [Understanding SFTP Absolute FilePaths](http://www.cknotes.com/?p=135)
- [SFTP Server Responds with SSH_FX_NO_SUCH_FILE](https://cknotes.com/sftp-server-responds-with-ssh_fx_no_such_file-when-trying-to-openfile/)

### SFtp.ReadDirListing

`Chilkat 11.7.0 · tcl · SFtp · ReadDirListing · method · since 11.0.0`

```tcl
# handle is a string

# dirObj is a CkSFtpDir

set status [CkSFtp_ReadDirListing $this $handle  $dirObj]
```

Reads all remaining directory entries from `handle`, which must have been returned by `OpenDir`, and stores them in `dirObj`. Entries are returned in server order; Chilkat does not sort the listing.

After end-of-directory has been reached, another call on the same handle returns `1`, adds no entries, and sets `LastStatusCode` to `SSH_FX_EOF`.

This method does not clear `dirObj`. Use a new or cleared `SFtpDir` object when an empty result must replace an earlier listing. Close the directory handle when finished.

Returns 1 for success, 0 for failure.

Async variant: `ReadDirListingAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ReadFileBd

`Chilkat 11.7.0 · tcl · SFtp · ReadFileBd · method · since 9.5.0.77`

```tcl
# handle is a string

# numBytes is an integer

# bd is a CkBinData

set status [CkSFtp_ReadFileBd $this $handle  $numBytes  $bd]
```

Reads up to `numBytes` bytes from the current position of the remote file identified by `handle` and appends them to `bd`. The handle must have been returned by `OpenFile`.

Fewer bytes can be read when end-of-file is reached. Repeat the call until `Eof(handle)` returns `1` to read the entire file incrementally.

This method shares the handle's sequential read position with `ReadFileBytes` and `ReadFileText`. Existing bytes in `bd` are preserved.

Returns 1 for success, 0 for failure.

Async variant: `ReadFileBdAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ReadFileText

`Chilkat 11.7.0 · tcl · SFtp · ReadFileText · method`

```tcl
# handle is a string

# numBytes is an integer

# charset is a string

# outStr is a CkString (output)

set status [CkSFtp_ReadFileText $this $handle  $numBytes  $charset $outStr]

set retStr [CkSFtp_readFileText $this $handle $numBytes $charset]
```

Reads up to `numBytes` bytes from the current position of `handle`, decodes the bytes using `charset`, and returns the resulting text.

See [Supported Charsets](https://www.chilkatsoft.com/charsets_supported_by_chilkat.asp).

The requested size is measured in bytes, not characters. With a multibyte encoding such as UTF-8 or Shift_JIS, the final character can be split across calls. For robust streaming, read raw bytes and decode with application-maintained state.

**Multibyte boundaries:** Chilkat does not retain an incomplete multibyte character between calls. If `numBytes` ends in the middle of a UTF-8 sequence, the first returned string ends with the incomplete bytes and the next call begins with the remaining bytes. Choose byte counts that end on character boundaries, or read bytes and perform streaming decoding in the application.

Returns 1 for success, 0 for failure.

Async variant: `ReadFileTextAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ReadFileText32

`Chilkat 11.7.0 · tcl · SFtp · ReadFileText32 · method`

```tcl
# handle is a string

# offset is an integer

# numBytes is an integer

# charset is a string

# outStr is a CkString (output)

set status [CkSFtp_ReadFileText32 $this $handle  $offset  $numBytes  $charset $outStr]

set retStr [CkSFtp_readFileText32 $this $handle $offset $numBytes $charset]
```

Reads up to `numBytes` bytes from `handle` at the 32-bit byte `offset`, decodes the bytes using `charset`, and returns the resulting text.

See [Supported Charsets](https://www.chilkatsoft.com/charsets_supported_by_chilkat.asp).

The requested size is measured in bytes, not characters. With a multibyte encoding such as UTF-8 or Shift_JIS, the final character can be split across calls. For robust streaming, read raw bytes and decode with application-maintained state.

Returns 1 for success, 0 for failure.

Async variant: `ReadFileText32Async` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ReadFileText64

`Chilkat 11.7.0 · tcl · SFtp · ReadFileText64 · method`

```tcl
# handle is a string

# offset is a 64-bit integer

# numBytes is an integer

# charset is a string

# outStr is a CkString (output)

set status [CkSFtp_ReadFileText64 $this $handle  $offset  $numBytes  $charset $outStr]

set retStr [CkSFtp_readFileText64 $this $handle $offset $numBytes $charset]
```

Reads up to `numBytes` bytes from `handle` at the 64-bit byte `offset`, decodes the bytes using `charset`, and returns the resulting text.

See [Supported Charsets](https://www.chilkatsoft.com/charsets_supported_by_chilkat.asp).

The requested size is measured in bytes, not characters. With a multibyte encoding such as UTF-8 or Shift_JIS, the final character can be split across calls. For robust streaming, read raw bytes and decode with application-maintained state.

Returns 1 for success, 0 for failure.

Async variant: `ReadFileText64Async` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ReadFileText64s

`Chilkat 11.7.0 · tcl · SFtp · ReadFileText64s · method`

```tcl
# handle is a string

# offset is a string

# numBytes is an integer

# charset is a string

# outStr is a CkString (output)

set status [CkSFtp_ReadFileText64s $this $handle  $offset  $numBytes  $charset $outStr]

set retStr [CkSFtp_readFileText64s $this $handle $offset $numBytes $charset]
```

Reads up to `numBytes` bytes from `handle` at the byte offset supplied as decimal string `offset`, decodes the bytes using `charset`, and returns the resulting text.

See [Supported Charsets](https://www.chilkatsoft.com/charsets_supported_by_chilkat.asp).

The requested size is measured in bytes, not characters. With a multibyte encoding, the final character can be split across calls.

Returns 1 for success, 0 for failure.

Async variant: `ReadFileText64sAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ReadLink

`Chilkat 11.7.0 · tcl · SFtp · ReadLink · method · since 9.5.0.71`

```tcl
# path is a string

# outStr is a CkString (output)

set status [CkSFtp_ReadLink $this $path $outStr]

set retStr [CkSFtp_readLink $this $path]
```

Returns the target path stored in the symbolic link at remote `path`.

The returned value is the target string stored in the link. It is not automatically canonicalized and can be relative, absolute, or refer to a nonexistent target.

Returns 1 for success, 0 for failure.

Async variant: `ReadLinkAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.RealPath

`Chilkat 11.7.0 · tcl · SFtp · RealPath · method`

```tcl
# originalPath is a string

# composePath is a string

# outStr is a CkString (output)

set status [CkSFtp_RealPath $this $originalPath  $composePath $outStr]

set retStr [CkSFtp_realPath $this $originalPath $composePath]
```

Asks the server to canonicalize `originalPath` and returns the resulting absolute remote path.

For SFTP v5 or later, `composePath` may optionally modify or extend the original path; pass an empty string when no composition is needed. If `composePath` is absolute, it replaces `originalPath`.

SFTP v3 and v4 do not support path composition. On those versions, `composePath` is ignored and the method canonicalizes only `originalPath`.

Returns 1 for success, 0 for failure.

Async variant: `RealPathAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.RemoveDir

`Chilkat 11.7.0 · tcl · SFtp · RemoveDir · method`

```tcl
# path is a string

set status [CkSFtp_RemoveDir $this $path]
```

Deletes the remote directory specified by `path`.

Most SFTP servers require the directory to be empty before it can be removed.

Returns 1 for success, 0 for failure.

Async variant: `RemoveDirAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.RemoveFile

`Chilkat 11.7.0 · tcl · SFtp · RemoveFile · method`

```tcl
# filename is a string

set status [CkSFtp_RemoveFile $this $filename]
```

Deletes the remote file specified by `filename`.

Returns 1 for success, 0 for failure.

Async variant: `RemoveFileAsync` — same arguments, returns a `Task` (see Async variants below).

See also:

- [Understanding SFTP Absolute FilePaths](http://www.cknotes.com/?p=135)

### SFtp.RenameFileOrDir

`Chilkat 11.7.0 · tcl · SFtp · RenameFileOrDir · method`

```tcl
# oldPath is a string

# newPath is a string

set status [CkSFtp_RenameFileOrDir $this $oldPath  $newPath]
```

Renames or moves a remote file or directory from `oldPath` to `newPath`.

```
oldPath: someDirA/filename
newPath: someDirB/abc/xyz/filename
```

Returns 1 for success, 0 for failure.

Async variant: `RenameFileOrDirAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ResumeDownloadFileByName

`Chilkat 11.7.0 · tcl · SFtp · ResumeDownloadFileByName · method`

```tcl
# remoteFilePath is a string

# localFilePath is a string

set status [CkSFtp_ResumeDownloadFileByName $this $remoteFilePath  $localFilePath]
```

Resumes downloading `remoteFilePath` to the local filesystem path `localFilePath`. Chilkat uses only the existing local file size as the remote starting offset.

- If the local file is missing or empty, a normal download is performed.
- If it is smaller, the remaining remote bytes are appended after the existing local length.
- If it is the same size or larger, the method treats the download as complete and does not truncate or verify the local content.

**Important:** The existing local bytes are not compared with the remote source. Before resuming, the application must ensure that the local file is the correct prefix of the remote file.

Returns 1 for success, 0 for failure.

Async variant: `ResumeDownloadFileByNameAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.ResumeUploadFileByName

`Chilkat 11.7.0 · tcl · SFtp · ResumeUploadFileByName · method`

```tcl
# remoteFilePath is a string

# localFilePath is a string

set status [CkSFtp_ResumeUploadFileByName $this $remoteFilePath  $localFilePath]
```

Resumes uploading the local file at `localFilePath` to `remoteFilePath`. Chilkat uses only the existing remote file size as the local starting offset.

- If the remote file is missing or empty, a normal upload is performed.
- If it is smaller, the remaining local bytes are appended after the existing remote length.
- If it is the same size or larger, the method treats the upload as complete and does not truncate or verify the remote content.

**Important:** The existing remote bytes are not compared with the local source. Before resuming, the application must ensure that the remote file is the correct prefix of the local file.

Returns 1 for success, 0 for failure.

Async variant: `ResumeUploadFileByNameAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SendIgnore

`Chilkat 11.7.0 · tcl · SFtp · SendIgnore · method · since 9.5.0.66`

```tcl
set status [CkSFtp_SendIgnore $this]
```

**Full documentation for this method (same in every language):** [Explaining SFTP RealPath](https://www.chilkatsoft.com/ai-docs/v/11.7.0/articles/sftp_realpath.md)

Sends an SSH `IGNORE` message. No SFTP file handle or channel is required.

The server does not send a reply, but a successful send helps verify that the SSH connection is still writable.

Returns 1 for success, 0 for failure.

Async variant: `SendIgnoreAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SetAllowedAlgorithms

`Chilkat 11.7.0 · tcl · SFtp · SetAllowedAlgorithms · method · since 9.5.0.99`

```tcl
# json is a CkJsonObject

set status [CkSFtp_SetAllowedAlgorithms $this $json]
```

Configures the exact set of SSH algorithms permitted for subsequent connections using the settings in `json`.

Call this method before `Connect`. The connection fails when no mutually supported algorithm remains in a required category.

Returns 1 for success, 0 for failure.

### SFtp.SetCreateDt

`Chilkat 11.7.0 · tcl · SFtp · SetCreateDt · method`

```tcl
# pathOrHandle is a string

# isHandle is a boolean

# createDateTime is a CkDateTime

set status [CkSFtp_SetCreateDt $this $pathOrHandle  $isHandle  $createDateTime]
```

Sets the remote file's creation date and time. `pathOrHandle` may contain a remote path or an open handle. Set `isHandle` to `1` for a handle and `0` for a path.

SFTP v3 and earlier do not support setting creation time.

`createDateTime` supplies the new value.

Returns 1 for success, 0 for failure.

Async variant: `SetCreateDtAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SetCreateTimeStr

`Chilkat 11.7.0 · tcl · SFtp · SetCreateTimeStr · method`

```tcl
# pathOrHandle is a string

# bIsHandle is a boolean

# dateTimeStr is a string

set status [CkSFtp_SetCreateTimeStr $this $pathOrHandle  $bIsHandle  $dateTimeStr]
```

Sets the remote file's creation date and time. `pathOrHandle` may contain a remote path or an open handle. Set `bIsHandle` to `1` for a handle and `0` for a path.

Pass the value in `dateTimeStr` as an RFC 822 formatted string, for example `Fri, 21 Nov 1997 09:55:06 -0600`.

SFTP v3 and earlier do not support setting creation time.

Returns 1 for success, 0 for failure.

Async variant: `SetCreateTimeStrAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SetLastAccessDt

`Chilkat 11.7.0 · tcl · SFtp · SetLastAccessDt · method`

```tcl
# pathOrHandle is a string

# isHandle is a boolean

# accessDateTime is a CkDateTime

set status [CkSFtp_SetLastAccessDt $this $pathOrHandle  $isHandle  $accessDateTime]
```

Sets the remote file's last-access date and time. `pathOrHandle` may contain a remote path or an open handle. Set `isHandle` to `1` for a handle and `0` for a path.

`accessDateTime` supplies the new value.

Returns 1 for success, 0 for failure.

Async variant: `SetLastAccessDtAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SetLastAccessTimeStr

`Chilkat 11.7.0 · tcl · SFtp · SetLastAccessTimeStr · method`

```tcl
# pathOrHandle is a string

# bIsHandle is a boolean

# dateTimeStr is a string

set status [CkSFtp_SetLastAccessTimeStr $this $pathOrHandle  $bIsHandle  $dateTimeStr]
```

Sets the remote file's last-access date and time. `pathOrHandle` may contain a remote path or an open handle. Set `bIsHandle` to `1` for a handle and `0` for a path.

Pass the value in `dateTimeStr` as an RFC 822 formatted string, for example `Fri, 21 Nov 1997 09:55:06 -0600`.

Returns 1 for success, 0 for failure.

Async variant: `SetLastAccessTimeStrAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SetLastModifiedDt

`Chilkat 11.7.0 · tcl · SFtp · SetLastModifiedDt · method`

```tcl
# pathOrHandle is a string

# isHandle is a boolean

# modifiedDateTime is a CkDateTime

set status [CkSFtp_SetLastModifiedDt $this $pathOrHandle  $isHandle  $modifiedDateTime]
```

Sets the remote file's last-modified date and time. `pathOrHandle` may contain a remote path or an open handle. Set `isHandle` to `1` for a handle and `0` for a path.

`modifiedDateTime` supplies the new value.

Returns 1 for success, 0 for failure.

Async variant: `SetLastModifiedDtAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SetLastModifiedTimeStr

`Chilkat 11.7.0 · tcl · SFtp · SetLastModifiedTimeStr · method`

```tcl
# pathOrHandle is a string

# bIsHandle is a boolean

# dateTimeStr is a string

set status [CkSFtp_SetLastModifiedTimeStr $this $pathOrHandle  $bIsHandle  $dateTimeStr]
```

Sets the remote file's last-modified date and time. `pathOrHandle` may contain a remote path or an open handle. Set `bIsHandle` to `1` for a handle and `0` for a path.

Pass the value in `dateTimeStr` as an RFC 822 formatted string, for example `Fri, 21 Nov 1997 09:55:06 -0600`.

When SFTP v3 is negotiated, the stored timestamp has whole-second precision.

Returns 1 for success, 0 for failure.

Async variant: `SetLastModifiedTimeStrAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SetOwnerAndGroup

`Chilkat 11.7.0 · tcl · SFtp · SetOwnerAndGroup · method`

```tcl
# pathOrHandle is a string

# isHandle is a boolean

# owner is a string

# group is a string

set status [CkSFtp_SetOwnerAndGroup $this $pathOrHandle  $isHandle  $owner  $group]
```

Sets the owner and group of the remote item identified by `pathOrHandle`. Set `isHandle` to `1` for an open handle and `0` for a remote path.

`owner` and `group` supply the new textual owner and group values.

SFTP v3 and earlier do not support textual owner and group names.

Returns 1 for success, 0 for failure.

Async variant: `SetOwnerAndGroupAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SetPermissions

`Chilkat 11.7.0 · tcl · SFtp · SetPermissions · method`

```tcl
# pathOrHandle is a string

# isHandle is a boolean

# permissions is an integer

set status [CkSFtp_SetPermissions $this $pathOrHandle  $isHandle  $permissions]
```

Sets the POSIX permission bits for the remote item identified by `pathOrHandle`. Set `isHandle` to `1` for an open handle and `0` for a remote path.

Pass the permission bits, not the file-type bits. In languages supporting octal integer literals, common values include `0600`, `0644`, and `0755`. Their decimal equivalents are `384`, `420`, and `493`.

After setting permissions, `GetFilePermissions` returns the complete mode, including the file-type bits. For example, setting `0644` on a regular file can subsequently return `0100644`.

Returns 1 for success, 0 for failure.

Async variant: `SetPermissionsAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.StartKeyboardAuth

`Chilkat 11.7.0 · tcl · SFtp · StartKeyboardAuth · method · since 9.5.0.88`

```tcl
# login is a string

# outStr is a CkString (output)

set status [CkSFtp_StartKeyboardAuth $this $login $outStr]

set retStr [CkSFtp_startKeyboardAuth $this $login]
```

Begins keyboard-interactive authentication for `login` and returns XML describing the server's prompts.

```
<infoRequest numPrompts="N">
  <name>name_string</name>
  <instruction>instruction_string</instruction>
  <prompt1 echo="1_or_0">prompt_string</prompt1>
  ...
  <promptN echo="1_or_0">prompt_string</promptN>
</infoRequest>
```

The `echo` attribute indicates whether the response may be displayed while entered. A value of `0` normally identifies secret input such as a password.

If authentication immediately succeeds or fails, the result has one of these forms:

```
<success>success message</success>

<error>error message</error>
```

Returns 1 for success, 0 for failure.

Async variant: `StartKeyboardAuthAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SymLink

`Chilkat 11.7.0 · tcl · SFtp · SymLink · method · since 9.5.0.71`

```tcl
# oldPath is a string

# newPath is a string

set status [CkSFtp_SymLink $this $oldPath  $newPath]
```

Creates a symbolic link on the server. `oldPath` identifies the link target and `newPath` identifies the new symbolic-link path.

The server's SFTP implementation determines path interpretation and whether symbolic links are permitted.

Returns 1 for success, 0 for failure.

Async variant: `SymLinkAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SyncTreeDownload

`Chilkat 11.7.0 · tcl · SFtp · SyncTreeDownload · method`

```tcl
# remoteRoot is a string

# localRoot is a string

# mode is an integer

# recurse is a boolean

set status [CkSFtp_SyncTreeDownload $this $remoteRoot  $localRoot  $mode  $recurse]
```

Synchronizes files from the remote directory `remoteRoot` to the local filesystem directory `localRoot`.

| Mode | Behavior |
| :--- | :--- |
| `0` | Download all files. |
| `1` | Download files that do not exist locally. |
| `2` | Download files that are newer remotely or missing locally. |
| `3` | Download only files that are newer remotely; do not download missing local files. |
| `5` | Download files that are missing locally or differ in size. |
| `6` | Mode 5 plus files that are newer remotely. |
| `99` | Do not download; delete remote files that do not exist locally. |

Set `recurse` to `1` to descend into subdirectories. An absolute remote path begins with `/`; a relative path is interpreted from the authenticated user's home directory.

Use `GetSyncedFiles` after the operation to retrieve the relative paths that were downloaded or created.

With `SyncCreateAllLocalDirs` set to `1`, mode `0` creates empty remote directories locally. Mode `1` downloads only missing local files and preserves existing local files. Mode `99` deletes files from the remote tree that are absent locally; it does not delete extra local files.

Returns 1 for success, 0 for failure.

Async variant: `SyncTreeDownloadAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.SyncTreeUpload

`Chilkat 11.7.0 · tcl · SFtp · SyncTreeUpload · method`

```tcl
# localBaseDir is a string

# remoteBaseDir is a string

# mode is an integer

# bRecurse is a boolean

set status [CkSFtp_SyncTreeUpload $this $localBaseDir  $remoteBaseDir  $mode  $bRecurse]
```

Synchronizes files from the local filesystem directory `localBaseDir` to the remote directory `remoteBaseDir`.

| Mode | Behavior |
| :--- | :--- |
| `0` | Upload all files. |
| `1` | Upload files that do not exist remotely. |
| `2` | Upload files that are newer locally or missing remotely. |
| `3` | Upload only files that are newer locally; do not upload missing remote files. |
| `4` | Upload files that are missing remotely or differ in size. |
| `5` | Mode 4 plus files that are newer locally. |

Set `bRecurse` to `1` to descend into subdirectories. An absolute remote path begins with `/`; a relative path is interpreted from the authenticated user's home directory.

Use `GetSyncedFiles` after the operation to retrieve the relative paths that were uploaded.

Mode `0` also creates empty remote directories. Mode `1` uploads only missing files and does not replace an existing remote file merely because the local file is newer; use mode `2` for missing-or-newer behavior. The filename and directory filters are applied during recursive traversal.

Returns 1 for success, 0 for failure.

Async variant: `SyncTreeUploadAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.UploadBd

`Chilkat 11.7.0 · tcl · SFtp · UploadBd · method · since 9.5.0.62`

```tcl
# binData is a CkBinData

# remoteFilePath is a string

set status [CkSFtp_UploadBd $this $binData  $remoteFilePath]
```

Uploads all bytes in `binData` to the remote file at `remoteFilePath`.

If the destination exists, it is truncated before the bytes are uploaded.

Returns 1 for success, 0 for failure.

Async variant: `UploadBdAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.UploadFile

`Chilkat 11.7.0 · tcl · SFtp · UploadFile · method`

```tcl
# handle is a string

# fromLocalFilePath is a string

set status [CkSFtp_UploadFile $this $handle  $fromLocalFilePath]
```

Streams the local filesystem file at `fromLocalFilePath` to the remote file identified by `handle`. The handle must have been returned by `OpenFile`.

Close the remote handle when the upload is complete.

The upload begins at the handle's current sequential write position. Existing bytes before that position are preserved unless the file was truncated when opened.

Returns 1 for success, 0 for failure.

Async variant: `UploadFileAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.UploadFileByName

`Chilkat 11.7.0 · tcl · SFtp · UploadFileByName · method`

```tcl
# remoteFilePath is a string

# localFilePath is a string

set status [CkSFtp_UploadFileByName $this $remoteFilePath  $localFilePath]
```

Uploads the local filesystem file at `localFilePath` to `remoteFilePath`.

When `PreserveDate` is `1`, Chilkat preserves the local file's last-modified time on the remote file.

An absolute remote path begins with `/` and is relative to the server filesystem root. A relative path is interpreted relative to the authenticated user's home directory.

If the destination exists, it is truncated before the upload. A zero-byte local file creates or truncates the remote file to zero bytes. Missing remote parent directories are not created automatically.

Returns 1 for success, 0 for failure.

Async variant: `UploadFileByNameAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.UploadSb

`Chilkat 11.7.0 · tcl · SFtp · UploadSb · method · since 9.5.0.62`

```tcl
# sb is a CkStringBuilder

# remoteFilePath is a string

# charset is a string

# includeBom is a boolean

set status [CkSFtp_UploadSb $this $sb  $remoteFilePath  $charset  $includeBom]
```

Encodes the text in `sb` using `charset` and uploads it to `remoteFilePath`.

Set `includeBom` to `1` to prepend a byte-order mark when the selected encoding supports one.

If the destination exists, it is truncated before the text is uploaded. For `utf-8`, setting `includeBom` to `1` prepends the three bytes `EF BB BF`; setting it to `0` omits them.

Returns 1 for success, 0 for failure.

Async variant: `UploadSbAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.WriteFileBd

`Chilkat 11.7.0 · tcl · SFtp · WriteFileBd · method · since 9.5.0.77`

```tcl
# handle is a string

# bd is a CkBinData

set status [CkSFtp_WriteFileBd $this $handle  $bd]
```

Appends all bytes in `bd` to the remote file identified by `handle`. The handle must have been returned by `OpenFile`.

Returns 1 for success, 0 for failure.

Async variant: `WriteFileBdAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.WriteFileText

`Chilkat 11.7.0 · tcl · SFtp · WriteFileText · method`

```tcl
# handle is a string

# charset is a string

# textData is a string

set status [CkSFtp_WriteFileText $this $handle  $charset  $textData]
```

Encodes `textData` using `charset` and writes the resulting bytes at the current sequential write position for `handle`.

The position is maintained by Chilkat for the handle. Opening an existing file with `openOrCreate` positions sequential writes at the current end of the file. An explicit-offset write can change the position used by the next sequential write. When the file was opened with `appendData`, writes are forced to the end.

See [Supported Charsets](https://www.chilkatsoft.com/charsets_supported_by_chilkat.asp).

No byte-order mark or line ending is added unless it is present in the supplied text or produced by the selected encoding.

Returns 1 for success, 0 for failure.

Async variant: `WriteFileTextAsync` — same arguments, returns a `Task` (see Async variants below).

### SFtp.WriteFileText32

`Chilkat 11.7.0 · tcl · SFtp · WriteFileText32 · method`

```tcl
# handle is a string

# offset32 is an integer

# charset is a string

# textData is a string

set status [CkSFtp_WriteFileText32 $this $handle  $offset32  $charset  $textData]
```

Encodes `textData` using `charset` and writes the resulting bytes to `handle` at the 32-bit byte offset `offset32`.

After a successful explicit-offset write, the next sequential write begins immediately after the bytes written by this call. If the file was opened with `appendData`, the server appends and the explicit offset does not control placement.

See [Supported Charsets](https://www.chilkatsoft.com/charsets_supported_by_chilkat.asp).

`offset32` must be nonnegative. A negative value can be interpreted as a very large unsigned offset. Writing beyond end-of-file can create a sparse file; whether the gap is sparse is determined by the server filesystem.

No byte-order mark or line ending is added unless it is present in the supplied text or produced by the selected encoding.

Returns 1 for success, 0 for failure.

Async variant: `WriteFileText32Async` — same arguments, returns a `Task` (see Async variants below).

### SFtp.WriteFileText64

`Chilkat 11.7.0 · tcl · SFtp · WriteFileText64 · method`

```tcl
# handle is a string

# offset64 is a 64-bit integer

# charset is a string

# textData is a string

set status [CkSFtp_WriteFileText64 $this $handle  $offset64  $charset  $textData]
```

Encodes `textData` using `charset` and writes the resulting bytes to `handle` at the 64-bit byte offset `offset64`.

See [Supported Charsets](https://www.chilkatsoft.com/charsets_supported_by_chilkat.asp).

No byte-order mark or line ending is added unless it is present in the supplied text or produced by the selected encoding.

Returns 1 for success, 0 for failure.

Async variant: `WriteFileText64Async` — same arguments, returns a `Task` (see Async variants below).

### SFtp.WriteFileText64s

`Chilkat 11.7.0 · tcl · SFtp · WriteFileText64s · method`

```tcl
# handle is a string

# offset64 is a string

# charset is a string

# textData is a string

set status [CkSFtp_WriteFileText64s $this $handle  $offset64  $charset  $textData]
```

Encodes `textData` using `charset` and writes the resulting bytes to `handle` at the byte offset supplied as decimal string `offset64`.

See [Supported Charsets](https://www.chilkatsoft.com/charsets_supported_by_chilkat.asp).

No byte-order mark or line ending is added unless it is present in the supplied text or produced by the selected encoding.

Returns 1 for success, 0 for failure.

Async variant: `WriteFileText64sAsync` — same arguments, returns a `Task` (see Async variants below).

## Events and callbacks

This binding has no event callbacks. For progress, percent-done or cancellation use the `*Async` variant of a method and poll the returned `Task` (`PercentDone`, `Finished`, `Cancel`).

## Async variants

Each returns a `Task` instead of the result and takes the same arguments as the synchronous method; run the task, wait for `Finished`, then read the result from the task. No new Async methods are added from 11.7.0 on.

```tcl
# returns a CkTask

# username is a string

# privateKey is a CkSshKey

set ret_task [CkSFtp_AuthenticatePkAsync $this $username  $privateKey]
# returns a CkTask

# login is a string

# password is a string

set ret_task [CkSFtp_AuthenticatePwAsync $this $login  $password]
# returns a CkTask

# username is a string

# password is a string

# privateKey is a CkSshKey

set ret_task [CkSFtp_AuthenticatePwPkAsync $this $username  $password  $privateKey]
# returns a CkTask

# login is a CkSecureString

# password is a CkSecureString

set ret_task [CkSFtp_AuthenticateSecPwAsync $this $login  $password]
# returns a CkTask

# username is a CkSecureString

# password is a CkSecureString

# privateKey is a CkSshKey

set ret_task [CkSFtp_AuthenticateSecPwPkAsync $this $username  $password  $privateKey]
# returns a CkTask

# handle is a string

set ret_task [CkSFtp_CloseHandleAsync $this $handle]
# returns a CkTask

# domainName is a string

# port is an integer

set ret_task [CkSFtp_ConnectAsync $this $domainName  $port]
# returns a CkTask

# sshConn is a CkSsh

# hostname is a string

# port is an integer

set ret_task [CkSFtp_ConnectThroughSshAsync $this $sshConn  $hostname  $port]
# returns a CkTask

# response is a string

set ret_task [CkSFtp_ContinueKeyboardAuthAsync $this $response]
# returns a CkTask

# localFilename is a string

# remoteFilename is a string

# isHandle is a boolean

set ret_task [CkSFtp_CopyFileAttrAsync $this $localFilename  $remoteFilename  $isHandle]
# returns a CkTask

# path is a string

set ret_task [CkSFtp_CreateDirAsync $this $path]
# returns a CkTask

# remoteFilePath is a string

# binData is a CkBinData

set ret_task [CkSFtp_DownloadBdAsync $this $remoteFilePath  $binData]
# returns a CkTask

# handle is a string

# toFilename is a string

set ret_task [CkSFtp_DownloadFileAsync $this $handle  $toFilename]
# returns a CkTask

# remoteFilePath is a string

# localFilePath is a string

set ret_task [CkSFtp_DownloadFileByNameAsync $this $remoteFilePath  $localFilePath]
# returns a CkTask

# remoteFilePath is a string

# charset is a string

# sb is a CkStringBuilder

set ret_task [CkSFtp_DownloadSbAsync $this $remoteFilePath  $charset  $sb]
# returns a CkTask

# remotePath is a string

# followLinks is a boolean

set ret_task [CkSFtp_FileExistsAsync $this $remotePath  $followLinks]
# returns a CkTask

# handle is a string

set ret_task [CkSFtp_FsyncAsync $this $handle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFileCreateTimeStrAsync $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFileGroupAsync $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFileLastAccessStrAsync $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFileLastModifiedStrAsync $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFileOwnerAsync $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFilePermissionsAsync $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFileSize32Async $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFileSize64Async $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# pathOrHandle is a string

# bFollowLinks is a boolean

# bIsHandle is a boolean

set ret_task [CkSFtp_GetFileSizeStrAsync $this $pathOrHandle  $bFollowLinks  $bIsHandle]
# returns a CkTask

# oldPath is a string

# newPath is a string

set ret_task [CkSFtp_HardLinkAsync $this $oldPath  $newPath]
# returns a CkTask

set ret_task [CkSFtp_InitializeSftpAsync $this]
# returns a CkTask

# path is a string

set ret_task [CkSFtp_OpenDirAsync $this $path]
# returns a CkTask

# remotePath is a string

# access is a string

# createDisposition is a string

set ret_task [CkSFtp_OpenFileAsync $this $remotePath  $access  $createDisposition]
# returns a CkTask

# handle is a string

# dirObj is a CkSFtpDir

set ret_task [CkSFtp_ReadDirListingAsync $this $handle  $dirObj]
# returns a CkTask

# handle is a string

# numBytes is an integer

# bd is a CkBinData

set ret_task [CkSFtp_ReadFileBdAsync $this $handle  $numBytes  $bd]
# returns a CkTask

# handle is a string

# numBytes is an integer

# charset is a string

set ret_task [CkSFtp_ReadFileTextAsync $this $handle  $numBytes  $charset]
# returns a CkTask

# handle is a string

# offset is an integer

# numBytes is an integer

# charset is a string

set ret_task [CkSFtp_ReadFileText32Async $this $handle  $offset  $numBytes  $charset]
# returns a CkTask

# handle is a string

# offset is a 64-bit integer

# numBytes is an integer

# charset is a string

set ret_task [CkSFtp_ReadFileText64Async $this $handle  $offset  $numBytes  $charset]
# returns a CkTask

# handle is a string

# offset is a string

# numBytes is an integer

# charset is a string

set ret_task [CkSFtp_ReadFileText64sAsync $this $handle  $offset  $numBytes  $charset]
# returns a CkTask

# path is a string

set ret_task [CkSFtp_ReadLinkAsync $this $path]
# returns a CkTask

# originalPath is a string

# composePath is a string

set ret_task [CkSFtp_RealPathAsync $this $originalPath  $composePath]
# returns a CkTask

# path is a string

set ret_task [CkSFtp_RemoveDirAsync $this $path]
# returns a CkTask

# filename is a string

set ret_task [CkSFtp_RemoveFileAsync $this $filename]
# returns a CkTask

# oldPath is a string

# newPath is a string

set ret_task [CkSFtp_RenameFileOrDirAsync $this $oldPath  $newPath]
# returns a CkTask

# remoteFilePath is a string

# localFilePath is a string

set ret_task [CkSFtp_ResumeDownloadFileByNameAsync $this $remoteFilePath  $localFilePath]
# returns a CkTask

# remoteFilePath is a string

# localFilePath is a string

set ret_task [CkSFtp_ResumeUploadFileByNameAsync $this $remoteFilePath  $localFilePath]
# returns a CkTask

set ret_task [CkSFtp_SendIgnoreAsync $this]
# returns a CkTask

# pathOrHandle is a string

# isHandle is a boolean

# createDateTime is a CkDateTime

set ret_task [CkSFtp_SetCreateDtAsync $this $pathOrHandle  $isHandle  $createDateTime]
# returns a CkTask

# pathOrHandle is a string

# bIsHandle is a boolean

# dateTimeStr is a string

set ret_task [CkSFtp_SetCreateTimeStrAsync $this $pathOrHandle  $bIsHandle  $dateTimeStr]
# returns a CkTask

# pathOrHandle is a string

# isHandle is a boolean

# accessDateTime is a CkDateTime

set ret_task [CkSFtp_SetLastAccessDtAsync $this $pathOrHandle  $isHandle  $accessDateTime]
# returns a CkTask

# pathOrHandle is a string

# bIsHandle is a boolean

# dateTimeStr is a string

set ret_task [CkSFtp_SetLastAccessTimeStrAsync $this $pathOrHandle  $bIsHandle  $dateTimeStr]
# returns a CkTask

# pathOrHandle is a string

# isHandle is a boolean

# modifiedDateTime is a CkDateTime

set ret_task [CkSFtp_SetLastModifiedDtAsync $this $pathOrHandle  $isHandle  $modifiedDateTime]
# returns a CkTask

# pathOrHandle is a string

# bIsHandle is a boolean

# dateTimeStr is a string

set ret_task [CkSFtp_SetLastModifiedTimeStrAsync $this $pathOrHandle  $bIsHandle  $dateTimeStr]
# returns a CkTask

# pathOrHandle is a string

# isHandle is a boolean

# owner is a string

# group is a string

set ret_task [CkSFtp_SetOwnerAndGroupAsync $this $pathOrHandle  $isHandle  $owner  $group]
# returns a CkTask

# pathOrHandle is a string

# isHandle is a boolean

# permissions is an integer

set ret_task [CkSFtp_SetPermissionsAsync $this $pathOrHandle  $isHandle  $permissions]
# returns a CkTask

# login is a string

set ret_task [CkSFtp_StartKeyboardAuthAsync $this $login]
# returns a CkTask

# oldPath is a string

# newPath is a string

set ret_task [CkSFtp_SymLinkAsync $this $oldPath  $newPath]
# returns a CkTask

# remoteRoot is a string

# localRoot is a string

# mode is an integer

# recurse is a boolean

set ret_task [CkSFtp_SyncTreeDownloadAsync $this $remoteRoot  $localRoot  $mode  $recurse]
# returns a CkTask

# localBaseDir is a string

# remoteBaseDir is a string

# mode is an integer

# bRecurse is a boolean

set ret_task [CkSFtp_SyncTreeUploadAsync $this $localBaseDir  $remoteBaseDir  $mode  $bRecurse]
# returns a CkTask

# binData is a CkBinData

# remoteFilePath is a string

set ret_task [CkSFtp_UploadBdAsync $this $binData  $remoteFilePath]
# returns a CkTask

# handle is a string

# fromLocalFilePath is a string

set ret_task [CkSFtp_UploadFileAsync $this $handle  $fromLocalFilePath]
# returns a CkTask

# remoteFilePath is a string

# localFilePath is a string

set ret_task [CkSFtp_UploadFileByNameAsync $this $remoteFilePath  $localFilePath]
# returns a CkTask

# sb is a CkStringBuilder

# remoteFilePath is a string

# charset is a string

# includeBom is a boolean

set ret_task [CkSFtp_UploadSbAsync $this $sb  $remoteFilePath  $charset  $includeBom]
# returns a CkTask

# handle is a string

# bd is a CkBinData

set ret_task [CkSFtp_WriteFileBdAsync $this $handle  $bd]
# returns a CkTask

# handle is a string

# charset is a string

# textData is a string

set ret_task [CkSFtp_WriteFileTextAsync $this $handle  $charset  $textData]
# returns a CkTask

# handle is a string

# offset32 is an integer

# charset is a string

# textData is a string

set ret_task [CkSFtp_WriteFileText32Async $this $handle  $offset32  $charset  $textData]
# returns a CkTask

# handle is a string

# offset64 is a 64-bit integer

# charset is a string

# textData is a string

set ret_task [CkSFtp_WriteFileText64Async $this $handle  $offset64  $charset  $textData]
# returns a CkTask

# handle is a string

# offset64 is a string

# charset is a string

# textData is a string

set ret_task [CkSFtp_WriteFileText64sAsync $this $handle  $offset64  $charset  $textData]
```

## Deprecated members — do not use in new code

| Member | Kind | Deprecated in | Use instead |
|---|---|---|---|
| `AccumulateBytes` | method | before 11.6.1 | — |
| `Add64` | method | before 11.6.1 | — |
| `ClearAccumulateBuffer` | method | before 11.6.1 | — |
| `GetFileCreateDt` | method | before 11.6.1 | — |
| `GetFileLastAccessDt` | method | before 11.6.1 | — |
| `GetFileLastModifiedDt` | method | before 11.6.1 | — |
| `LastJsonData` | method | before 11.6.1 | — |
| `ReadDir` | method | before 11.6.1 | `ReadDirListing` |
| `ReadFileBytes` | method | before 11.6.1 | — |
| `ReadFileBytes32` | method | before 11.6.1 | — |
| `ReadFileBytes64` | method | before 11.6.1 | — |
| `ReadFileBytes64s` | method | before 11.6.1 | — |
| `WriteFileBytes` | method | before 11.6.1 | — |
| `WriteFileBytes32` | method | before 11.6.1 | — |
| `WriteFileBytes64` | method | before 11.6.1 | — |
| `WriteFileBytes64s` | method | before 11.6.1 | — |

## Related classes

[`BinData`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/BinData.md), [`CkDateTime`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/CkDateTime.md), [`JsonObject`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/JsonObject.md), [`SFtpDir`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/SFtpDir.md), [`SecureString`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/SecureString.md), [`Ssh`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/Ssh.md), [`SshKey`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/SshKey.md), [`StringBuilder`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/StringBuilder.md), [`StringTable`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/StringTable.md), [`Task`](https://www.chilkatsoft.com/ai-docs/v/11.7.0/tcl/classes/Task.md)

