Serial.printf(" LAST WRITE: %d-%02d-%02d %02d:%02d:%02d\n",(tmstruct->tm_year)+1900,(tmstruct->tm_mon)+1,tmstruct->tm_mday,tmstruct->tm_hour,tmstruct->tm_min,tmstruct->tm_sec);
Serial.printf(" LAST WRITE: %d-%02d-%02d %02d:%02d:%02d\n",(tmstruct->tm_year)+1900,(tmstruct->tm_mon)+1,tmstruct->tm_mday,tmstruct->tm_hour,tmstruct->tm_min,tmstruct->tm_sec);
}
file=root.openNextFile();
}
}
voidcreateDir(fs::FS&fs,constchar*path){
Serial.printf("Creating Dir: %s\n",path);
if(fs.mkdir(path)){
Serial.println("Dir created");
}else{
Serial.println("mkdir failed");
}
}
voidremoveDir(fs::FS&fs,constchar*path){
Serial.printf("Removing Dir: %s\n",path);
if(fs.rmdir(path)){
Serial.println("Dir removed");
}else{
Serial.println("rmdir failed");
}
}
voidreadFile(fs::FS&fs,constchar*path){
Serial.printf("Reading file: %s\n",path);
Filefile=fs.open(path);
if(!file){
Serial.println("Failed to open file for reading");
Serial.printf("\nNow is : %d-%02d-%02d %02d:%02d:%02d\n",(tmstruct.tm_year)+1900,(tmstruct.tm_mon)+1,tmstruct.tm_mday,tmstruct.tm_hour,tmstruct.tm_min,tmstruct.tm_sec);