Set up a file to print, but don't print it yet. If successful return true, else write an error message to reply and return false
| 3613 | // Set up a file to print, but don't print it yet. |
| 3614 | // If successful return true, else write an error message to reply and return false |
| 3615 | bool GCodes::QueueFileToPrint(const char *_ecv_array fileName, const StringRef& reply) noexcept |
| 3616 | { |
| 3617 | FileStore *_ecv_null const f = platform.OpenFile(Platform::GetGCodeDir(), fileName, OpenMode::read); |
| 3618 | if (f != nullptr) |
| 3619 | { |
| 3620 | fileToPrint.Set(f); |
| 3621 | return true; |
| 3622 | } |
| 3623 | |
| 3624 | reply.printf("GCode file \"%s\" not found\n", fileName); |
| 3625 | return false; |
| 3626 | } |
| 3627 | #endif |
| 3628 | |
| 3629 | // Start printing the file already selected. |