MCPcopy Create free account
hub / github.com/BruceDevices/firmware / copyFile

Function copyFile

src/core/sd_functions.cpp:258–269  ·  view source on GitHub ↗

** Function name: copyFile ** Description: copy file address to memory ***************************************************************************************/

Source from the content-addressed store, hash-verified

256** Description: copy file address to memory
257***************************************************************************************/
258bool copyFile(FS fs, String path) {
259 File file = fs.open(path, FILE_READ);
260 if (!file.isDirectory()) {
261 fileToCopy = path;
262 file.close();
263 return true;
264 } else {
265 displayRedStripe("Cannot copy Folder");
266 file.close();
267 return false;
268 }
269}
270
271/***************************************************************************************
272** Function name: pasteFile

Callers 1

loopSDFunction · 0.85

Calls 2

displayRedStripeFunction · 0.85
closeMethod · 0.80

Tested by

no test coverage detected