peterus / ESP-FTP-Server-Lib

MIT License
25 stars 12 forks source link

Support for sdFat.h #31

Open maxbrito500 opened 1 year ago

maxbrito500 commented 1 year ago

Hello,

This library is so simple and functional, the only difficulty is that I'm using sdFat instead of the default SD that comes with ESP32 in Arduino. This is mostly to permit support for long filenames.

The line ftp.addFilesystem("SD", &SD); on the example is therefore not accepted as argument.

How would it be possible to add support for sdFat?

Many thanks in advance.

maxbrito500 commented 1 year ago

There was already someone writing this implementation for this FTP server: https://github.com/jbilander/ESP32-FTP-Server

Perhaps the code can be merged?

peterus commented 1 year ago

thanks for the suggestion! I will need to take a look into the code which you found, sadly it is no fork, so making a diff will be not so easy.

without looking into the sdFat i can not tell you now if it is possible or not.

maxbrito500 commented 1 year ago

I've tried out and you are indeed correct. Albeit sdFAT is supported there, that repo also has compilation errors.

From what I've observed, the syntax for sdFat is very similar to the legacy SD libraries. The main difference is on the open() function and the lack of getParent() type of functionality because it is supposed to work across many different file systems.

Anyways, thank you so much for looking into this.