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

Method SeekFile

src/SBC/SbcInterface.cpp:1743–1764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1741}
1742
1743bool SbcInterface::SeekFile(FileHandle handle, FilePosition offset) noexcept
1744{
1745 // Don't do anything if the SBC is not connected
1746 if (!IsConnected())
1747 {
1748 return false;
1749 }
1750
1751 // Set up the request content
1752 MutexLocker locker(fileMutex);
1753
1754 fileHandle = handle;
1755 fileOffset = offset;
1756 if (!DoFileOperation(FileOperation::seek))
1757 {
1758 reprap.GetPlatform().Message(ErrorMessage, "Timeout while trying to seek in file\n");
1759 return false;
1760 }
1761
1762 // Return the result
1763 return fileSuccess;
1764}
1765
1766bool SbcInterface::TruncateFile(FileHandle handle) noexcept
1767{

Callers 1

SeekMethod · 0.80

Calls 2

IsConnectedFunction · 0.85
MessageMethod · 0.80

Tested by

no test coverage detected