** Function name: getFileSize ** Description: get a file size without opening ***************************************************************************************/
| 436 | ** Description: get a file size without opening |
| 437 | ***************************************************************************************/ |
| 438 | size_t getFileSize(FS &fs, String filepath) { |
| 439 | File file = fs.open(filepath, FILE_READ); |
| 440 | if (!file) return 0; |
| 441 | size_t fileSize = file.size(); |
| 442 | file.close(); |
| 443 | return fileSize; |
| 444 | } |
| 445 | |
| 446 | String md5File(FS &fs, String filepath) { |
| 447 | if (!fs.exists(filepath)) return ""; |