| 1741 | } |
| 1742 | |
| 1743 | bool 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 | |
| 1766 | bool SbcInterface::TruncateFile(FileHandle handle) noexcept |
| 1767 | { |
no test coverage detected