Network Component  Version 6.7.7
MDK-Professional Middleware for IP Networking
FTP_Server_FS.c File Reference
#include <stdio.h>
#include "rl_net.h"
#include "rl_fs.h"

Macros

#define FDELETE(fn)   fdelete(fn,NULL)
 [code_FTP_Server_FS] More...
 
#define NET_FTP_SERVER_VBUF_SIZE   0
 

Functions

__weak void * ftp_server_fopen (const char *fname, const char *mode)
 Open a file for reading or writing in FTP server. More...
 
__weak void ftp_server_fclose (void *file)
 Close a file previously open in FTP server. More...
 
__weak uint32_t ftp_server_fread (void *file, uint8_t *buf, uint32_t len)
 Read block of data from a file in FTP server. More...
 
__weak uint32_t ftp_server_fwrite (void *file, const uint8_t *buf, uint32_t len)
 Write block of data to a file in FTP server. More...
 
__weak bool ftp_server_fdelete (const char *fname)
 Delete a file in FTP server. More...
 
__weak bool ftp_server_frename (const char *fname, const char *newname)
 Rename a file or directory in FTP server. More...
 
__weak bool ftp_server_mkdir (const char *path)
 Make a new directory in FTP server. More...
 
__weak bool ftp_server_rmdir (const char *path)
 Remove an empty directory in FTP server. More...
 
__weak uint32_t ftp_server_ffind (uint8_t code, char *buf, uint32_t buflen, const char *mask)
 Search the file system directory for matching files. More...
 

Macro Definition Documentation

◆ FDELETE

#define FDELETE (   fn)    fdelete(fn,NULL)

[code_FTP_Server_FS]

◆ NET_FTP_SERVER_VBUF_SIZE

#define NET_FTP_SERVER_VBUF_SIZE   0

Function Documentation

◆ ftp_server_mkdir()

__weak bool ftp_server_mkdir ( const char *  path)

Make a new directory in FTP server.

Parameters
[in]pathdirectory path to create.
Returns
  • true = Directory successfully created.
  • false = Failed to create a directory.

◆ ftp_server_rmdir()

__weak bool ftp_server_rmdir ( const char *  path)

Remove an empty directory in FTP server.

Parameters
[in]pathdirectory path to remove.
Returns
  • true = Directory successfully removed.
  • false = Failed to remove a directory.