📄 ftp_server.c
字号:
// FTP Server demo
// Creates two files, one for anonymous access and accessible only to a
// specified user.
// Enables users to download and upload files.
// This file and other embedded Ethernet and Internet code and resources are
// available from www.Lvr.com.
// Select a network configuration from \lib\tcpip\tcp_config.lib
// in the Dynamic C distribution.
#define TCPCONFIG 1
// Format the file system and reset the list of files in the user block.
// Execute this statement the first time the program runs,
// to put the file system in a known state.
#define FORMAT
// Enables file system 2 (FS2) support in the default functions for the file
// handler and enables clients to write files to the file system.
#define FTP_USE_FS2_HANDLERS
// The maximum number of files the file system can handle.
#define FS_MAX_FILES 50
// Specifies how many kilobytes of program Flash memory the file system can use.
#define FS2_USE_PROGRAM_FLASH 32
// Provides the servermask parameter for the sspec_addfsfile() function,
// which makes files available to the FTP server.
// SERVER_FTP specifies the FTP server.
// SERVER_WRITABLE enables authorized users to delete and overwrite files
// on the server.
#define FTP_CREATE_MASK SERVER_FTP | SERVER_WRITABLE
// A portion of the user block in memory holds a structure that associates
// the names of files with the files
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -