Welcome to the libDSFTP reference documentation! This set of HTML pages should tell you everything about using libDSFTP to add a FTP server to your own app. In the section you're reading now, I'd like to go through a quick step-by-step for the most typical use.
Then, you initialize the Wifi and FAT libraries as usual. Please refer to their respective examples for info on how to do it, or to the DSFTP source.
BFTPServer server;
If you want to, you can also create an instance of BFTPConfigurator to configure the server. This is not mandatory, but it allows you to configure the FTP server via config file. This would look as follows.
BFTPConfigurator configurator(&server); configurator.configureFromFile("/data/settings/ftp.conf");
...or wherever you want the config file to be.
If you do not use a BFTPConfigurator, you must add users to the FTP server manually. Otherwise, you won't be able to log in. The simplest way to do this is like this:
server.addUser("myusername", "mypassword");
Please refer to BFTPServer for other arguments to this command.
server.handle();
void mainloop(void) { BFTPServer server; BFTPConfigurator configurator(&server); configurator.configureFromFile("/data/settings/ftp.conf"); while(true) { server.handle(); swiWaitForVBlank(); } }
Please refer to the source code of DSFTP and the other pages of this documentation for other possible settings and features.
That said, it's reasonably well-behaved here :-) Please send me your experiences with DSFTP via per email (replace _AT_ by @). Thank you!