sftp_server_file.c
error_t sftpServerWriteFile(SftpServerSession *session, const SshBinaryString *handle, uint64_t offset, const uint8_t *data, uint32_t fragLen, uint32_t totalLen)
Write the specified file.
Definition: sftp_server_file.c:561
error_t fsSeekFile(FsFile *file, int_t offset, uint_t origin)
Move to specified position in file.
Definition: fs_port_fatfs.c:483
@ SFTP_SERVER_SESSION_STATE_RECEIVING_DATA
Definition: sftp_server.h:160
error_t sftpServerReadFile(SftpServerSession *session, const SshBinaryString *handle, uint64_t offset, uint32_t *length)
Read the specified file.
Definition: sftp_server_file.c:660
error_t sftpServerReadData(SftpServerSession *session)
Read data from the specified file.
Definition: sftp_server_file.c:731
SFTP server.
error_t fsReadFile(FsFile *file, void *data, size_t size, size_t *length)
Read data from the specified file.
Definition: fs_port_fatfs.c:590
uint32_t sftpServerGenerateHandle(SftpServerSession *session)
Generate a unique handle.
Definition: sftp_server_misc.c:803
File operations.
error_t sftpServerGetRealPath(SftpServerSession *session, const SshString *path, SftpName *name)
Canonicalize a given path name to an absolute path.
Definition: sftp_server_file.c:53
error_t sftpServerRemoveFile(SftpServerSession *session, const SshString *path)
Remove a file.
Definition: sftp_server_file.c:356
error_t fsRenameFile(const char_t *oldPath, const char_t *newPath)
Rename the specified file.
Definition: fs_port_fatfs.c:325
SftpFileObject * sftpServerFindFile(SftpServerSession *session, const SshBinaryString *handle)
Find the file that matches a given handle.
Definition: sftp_server_file.c:821
error_t sftpServerRenameFile(SftpServerSession *session, const SshString *oldPath, const SshString *newPath)
Rename the specified file.
Definition: sftp_server_file.c:302
FsFile * fsOpenFile(const char_t *path, uint_t mode)
Open the specified file for reading or writing.
Definition: fs_port_fatfs.c:413
error_t sftpServerCloseFile(SftpServerSession *session, const SshBinaryString *handle)
Close a file.
Definition: sftp_server_file.c:780
error_t sftpServerOpenFile(SftpServerSession *session, const SshString *path, uint32_t pflags, const SftpFileAttrs *attributes, uint32_t *handle)
Open a file.
Definition: sftp_server_file.c:397
error_t sftpServerSetFileStat(SftpServerSession *session, const SshString *path, const SftpFileAttrs *attributes)
Modify file attributes.
Definition: sftp_server_file.c:231
error_t fsWriteFile(FsFile *file, void *data, size_t length)
Write data to the specified file.
Definition: fs_port_fatfs.c:539
Helper functions for SFTP server.
#define SSH_FILEXFER_ATTR_FLAGS_READONLY
Definition: sftp_common.h:69
error_t fsGetFileStat(const char_t *path, FsFileStat *fileStat)
Retrieve the attributes of the specified file.
Definition: fs_port_fatfs.c:256
error_t sftpServerWriteData(SftpServerSession *session)
Write data to the specified file.
Definition: sftp_server_file.c:623
error_t sftpServerSetFileStatEx(SftpServerSession *session, const SshBinaryString *handle, const SftpFileAttrs *attributes)
Modify file attributes.
Definition: sftp_server_file.c:267
uint_t sftpServerGetFilePermissions(SftpServerSession *session, const char_t *path)
Get permissions for the specified file or directory.
Definition: sftp_server_misc.c:852
Secure Shell (SSH)
error_t sftpServerGetFileStat(SftpServerSession *session, const SshString *path, SftpFileAttrs *attributes)
Retrieve file attributes.
Definition: sftp_server_file.c:93
const char_t * sftpServerStripRootDir(SftpServerSession *session, const char_t *path)
Strip root dir from specified pathname.
Definition: sftp_server_misc.c:971
error_t sftpServerGetPath(SftpServerSession *session, const SshString *path, char_t *fullPath, size_t maxLen)
Retrieve the full pathname.
Definition: sftp_server_misc.c:905
error_t sftpServerGetFileStatEx(SftpServerSession *session, const SshBinaryString *handle, SftpFileAttrs *attributes)
Retrieve file attributes.
Definition: sftp_server_file.c:191
Debugging facilities.