** Function name: copyFile ** Description: copy file address to memory ***************************************************************************************/
| 135 | ** Description: copy file address to memory |
| 136 | ***************************************************************************************/ |
| 137 | bool copyFile(String path) { |
| 138 | if (!setupSdCard()) { |
| 139 | // Serial.println("Fail to start SDCard"); |
| 140 | return false; |
| 141 | } |
| 142 | File file = SDM.open(path, FILE_READ); |
| 143 | if (!file.isDirectory()) { |
| 144 | fileToCopy = path; |
| 145 | file.close(); |
| 146 | return true; |
| 147 | } else { |
| 148 | displayRedStripe("Cannot copy Folder"); |
| 149 | launcherDelayMs(2000); |
| 150 | file.close(); |
| 151 | return false; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /*************************************************************************************** |
| 156 | ** Function name: pasteFile |
no test coverage detected