![]() |
TrustCore SDK NanoSSH API reference
version 7.0
|
Functions | |
MOC_EXTERN sbyte4 | SSHC_sftpNumBytesWritten (sftpcFileHandleDescr *p_sftpFileHandleDescr) |
Get the number of bytes written to an open file. More... | |
MOC_EXTERN void | SSHC_sftpSetWriteBuffer (sftpcFileHandleDescr *p_sftpFileHandleDescr, sbyte *pBuffer) |
Point a write buffer to a chunk of data to be transfered. More... | |
MOC_EXTERN void | SSHC_sftpSetWriteBufferSize (sftpcFileHandleDescr *p_sftpFileHandleDescr, sbyte4 bufSize) |
Set the size of a write buffer pointing to a chunk of data to be transfered. More... | |
MOC_EXTERN sbyte * | SSHC_sftpWriteBuffer (sftpcFileHandleDescr *p_sftpFileHandleDescr) |
Get a pointer to a file's write data buffer. More... | |
MOC_EXTERN sbyte4 | SSHC_sftpWriteBufferSize (sftpcFileHandleDescr *p_sftpFileHandleDescr) |
Get the number of bytes in a file's write buffer. More... | |
MOC_EXTERN sbyte4 | SSHC_sftpWriteLocation (sftpcFileHandleDescr *p_sftpFileHandleDescr) |
Get a file's current write location. More... | |
MOC_EXTERN sbyte4 SSHC_sftpNumBytesWritten | ( | sftpcFileHandleDescr * | p_sftpFileHandleDescr | ) |
This function returns the number of bytes already written to the specified open file. Typically an application first calls SSHC_openFile() and then calls this function to keep track of upload (write) progress.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_CLIENT__
__ENABLE_MOCANA_SSH_FTP_CLIENT__
p_sftpFileHandleDescr | Pointer to file handle descriptor. |
MOC_EXTERN void SSHC_sftpSetWriteBuffer | ( | sftpcFileHandleDescr * | p_sftpFileHandleDescr, |
sbyte * | pBuffer | ||
) |
This function points a write buffer to a chunk of data to be transfered.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_CLIENT__
__ENABLE_MOCANA_SSH_FTP_CLIENT__
p_sftpFileHandleDescr | Pointer to a file handle descriptor whose write buffer pointer you want to set. |
pBuffer | Pointer to chunk of data to transfer. |
sshc_ftp.c
MOC_EXTERN void SSHC_sftpSetWriteBufferSize | ( | sftpcFileHandleDescr * | p_sftpFileHandleDescr, |
sbyte4 | bufSize | ||
) |
This function sets the size of a write buffer pointing to a chunk of data to be transfered.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_CLIENT__
__ENABLE_MOCANA_SSH_FTP_CLIENT__
p_sftpFileHandleDescr | Pointer to a file handle descriptor whose write buffer size you want to set. |
bufSize | Number of bytes to set the write buffer size to. |
sshc_ftp.c
MOC_EXTERN sbyte* SSHC_sftpWriteBuffer | ( | sftpcFileHandleDescr * | p_sftpFileHandleDescr | ) |
This function returns a pointer to a buffer in which data written to a file is stored.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_CLIENT__
__ENABLE_MOCANA_SSH_FTP_CLIENT__
p_sftpFileHandleDescr | Pointer to file handle descriptor. |
MOC_EXTERN sbyte4 SSHC_sftpWriteBufferSize | ( | sftpcFileHandleDescr * | p_sftpFileHandleDescr | ) |
This function returns the number of bytes in the specified file descriptor's write buffer.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_CLIENT__
__ENABLE_MOCANA_SSH_FTP_CLIENT__
p_sftpFileHandleDescr | Pointer to file handle descriptor. |
MOC_EXTERN sbyte4 SSHC_sftpWriteLocation | ( | sftpcFileHandleDescr * | p_sftpFileHandleDescr | ) |
This function returns the specified file descriptor's current write location. The read file upcall typically calls this function to track write progress.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSH_CLIENT__
__ENABLE_MOCANA_SSH_FTP_CLIENT__
p_sftpFileHandleDescr | Pointer to file handle descriptor. |