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

Method TruncateFile

src/SBC/SbcInterface.cpp:1766–1786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1764}
1765
1766bool SbcInterface::TruncateFile(FileHandle handle) noexcept
1767{
1768 // Don't do anything if the SBC is not connected
1769 if (!IsConnected())
1770 {
1771 return false;
1772 }
1773
1774 // Set up the request content
1775 MutexLocker locker(fileMutex);
1776
1777 fileHandle = handle;
1778 if (!DoFileOperation(FileOperation::truncate))
1779 {
1780 reprap.GetPlatform().Message(ErrorMessage, "Timeout while trying to truncate file\n");
1781 return false;
1782 }
1783
1784 // Return the result
1785 return fileSuccess;
1786}
1787
1788void SbcInterface::CloseFile(FileHandle handle) noexcept
1789{

Callers 1

TruncateMethod · 0.80

Calls 2

IsConnectedFunction · 0.85
MessageMethod · 0.80

Tested by

no test coverage detected