MCPcopy Create free account
hub / github.com/HASwitchPlate/openHASP / getFileName

Method getFileName

lib/SimpleFTPServer/FtpServer.h:508–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506 int8_t readChar();
507
508 const char* getFileName(FTP_FILE *file){
509 #if STORAGE_TYPE <= STORAGE_SDFAT2
510 int max_characters = 100;
511 char f_name[max_characters];
512 file->getName(f_name, max_characters);
513 String filename = String(f_name);
514 return filename.c_str();
515 #elif STORAGE_TYPE == STORAGE_FATFS
516 return file->fileName();
517 #else
518 #if ESP_ARDUINO_VERSION_MAJOR >= 2
519 return file->path();
520 #else
521 return file->name();
522 #endif
523 #endif
524 }
525 bool exists( const char * path ) {
526#if STORAGE_TYPE == STORAGE_SPIFFS || (STORAGE_TYPE == STORAGE_SD && FTP_SERVER_NETWORK_TYPE == NETWORK_ESP8266_242)
527 if (strcmp(path, "/") == 0) return true;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected