scp_server_file.c
Path manipulation helper functions.
error_t scpServerOpenFileForWriting(ScpServerSession *session, const char_t *filename, uint32_t mode, uint64_t size)
Open a file for writing.
Definition: scp_server_file.c:55
@ SCP_SERVER_SESSION_STATE_WRITE_STATUS
Definition: scp_server.h:155
Helper functions for SCP server.
error_t scpServerOpenFileForReading(ScpServerSession *session)
Open a file for reading.
Definition: scp_server_file.c:122
error_t sshReadChannel(SshChannel *channel, void *data, size_t size, size_t *received, uint_t flags)
Receive data from the specified channel.
Definition: ssh.c:2180
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
error_t scpServerWriteData(ScpServerSession *session)
Write data to the specified file.
Definition: scp_server_file.c:205
@ SCP_SERVER_SESSION_STATE_READ_STATUS
Definition: scp_server.h:161
error_t scpServerReadData(ScpServerSession *session)
Read data from the specified file.
Definition: scp_server_file.c:291
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 sshWriteChannel(SshChannel *channel, const void *data, size_t length, size_t *written, uint_t flags)
Write data to the specified channel.
Definition: ssh.c:2051
SCP server.
File operations.
uint_t scpServerGetFilePermissions(ScpServerSession *session, const char_t *path)
Get permissions for the specified file or directory.
Definition: scp_server_misc.c:1125
bool_t fsDirExists(const char_t *path)
Check whether a directory exists.
Definition: fs_port_fatfs.c:667
error_t fsWriteFile(FsFile *file, void *data, size_t length)
Write data to the specified file.
Definition: fs_port_fatfs.c:539
error_t fsGetFileStat(const char_t *path, FsFileStat *fileStat)
Retrieve the attributes of the specified file.
Definition: fs_port_fatfs.c:256
void pathRemoveSlash(char_t *path)
Remove the trailing slash from a given path.
Definition: path.c:360
Secure Shell (SSH)
void pathRemoveFilename(char_t *path)
Remove the trailing file name from the supplied path.
Definition: path.c:120
Debugging facilities.
void pathCombine(char_t *path, const char_t *more, size_t maxLen)
Concatenate two paths.
Definition: path.c:394