TrustCore SDK NanoSSH API reference  version 7.0
SFTP Client get Functions

Functions

MOC_EXTERN sbyte * SSHC_sftpReadBuffer (sftpcFileHandleDescr *p_sftpFileHandleDescr)
 Get a pointer to a file's read data buffer. More...
 
MOC_EXTERN sbyte4 SSHC_sftpReadBufferSize (sftpcFileHandleDescr *p_sftpFileHandleDescr)
 Get the number of bytes in a file's read buffer. More...
 
MOC_EXTERN sbyte4 SSHC_sftpReadLocation (sftpcFileHandleDescr *p_sftpFileHandleDescr)
 Get a file's current read location. More...
 

Detailed Description

Function Documentation

◆ SSHC_sftpReadBuffer()

MOC_EXTERN sbyte* SSHC_sftpReadBuffer ( sftpcFileHandleDescr p_sftpFileHandleDescr)

This function returns a pointer to a buffer in which data read from a file is stored.

Since
1.41
Version
1.41 and later

To enable this function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSH_CLIENT__
  • __ENABLE_MOCANA_SSH_FTP_CLIENT__

sshc.h

Parameters
p_sftpFileHandleDescrPointer to file handle descriptor.
Returns
Pointer to a buffer containing a file's read data.
Remarks
This function is applicable to synchronous SFTP clients.
See also
SSHC_sftpReadBufferSize

sshc.h

◆ SSHC_sftpReadBufferSize()

MOC_EXTERN sbyte4 SSHC_sftpReadBufferSize ( sftpcFileHandleDescr p_sftpFileHandleDescr)

This function returns the number of bytes in the specified file descriptor's read buffer.

Since
1.41
Version
1.41 and later

To enable this function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSH_CLIENT__
  • __ENABLE_MOCANA_SSH_FTP_CLIENT__

sshc.h

Parameters
p_sftpFileHandleDescrPointer to file handle descriptor.
Returns
Number of bytes in the file's read buffer.
Remarks
This function is applicable to synchronous SFTP clients.
See also
SSHC_sftpReadBuffer

sshc.h

◆ SSHC_sftpReadLocation()

MOC_EXTERN sbyte4 SSHC_sftpReadLocation ( sftpcFileHandleDescr p_sftpFileHandleDescr)

This function returns the specified file descriptor's current read location. The read file upcall typically calls this function to track read progress.

Since
1.41
Version
1.41 and later

To enable this function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSH_CLIENT__
  • __ENABLE_MOCANA_SSH_FTP_CLIENT__

sshc.h

Parameters
p_sftpFileHandleDescrPointer to file handle descriptor.
Returns
0-based byte index of file's current read location.
Remarks
This function is applicable to synchronous SFTP clients.

sshc.h