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

Method openFile

lib/SimpleFTPServer/FtpServer.cpp:1850–1871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1848
1849#if(STORAGE_TYPE == STORAGE_SEEED_SD)
1850bool FtpServer::openFile(char path[FTP_CWD_SIZE], int readTypeInt)
1851{
1852 DEBUG_PRINT(F("File to open "));
1853 DEBUG_PRINT(path);
1854 DEBUG_PRINT(F(" readType "));
1855 DEBUG_PRINTLN(readTypeInt);
1856
1857 if(readTypeInt == 0X01) {
1858 readTypeInt = FILE_READ;
1859 } else {
1860 readTypeInt = FILE_WRITE;
1861 }
1862
1863 file = STORAGE_MANAGER.open(path, readTypeInt);
1864 if(!file) { // && readTypeInt[0]==FILE_READ) {
1865 return false;
1866 } else {
1867 DEBUG_PRINTLN("TRUE");
1868
1869 return true;
1870 }
1871}
1872#elif(STORAGE_TYPE == STORAGE_SD && defined(ESP8266)) // FTP_SERVER_NETWORK_TYPE_SELECTED == NETWORK_ESP8266_242)
1873bool FtpServer::openFile(char path[FTP_CWD_SIZE], int readTypeInt)
1874{

Callers 4

handleFileListFunction · 0.80
add_form_buttonFunction · 0.80
handleFileListFunction · 0.80
webHandleHaspConfigFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected