MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / QueueFileToPrint

Method QueueFileToPrint

src/GCodes/GCodes.cpp:3615–3626  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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
3615bool 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.

Callers

nothing calls this directly

Calls 3

OpenFileMethod · 0.45
SetMethod · 0.45
printfMethod · 0.45

Tested by

no test coverage detected