croc
croc copied to clipboard
Handle stdin gracefully
The current version of croc
handles stdin
by buffering its input into a temporary file. While this is fine, in principle, it would be preferable for a number of reasons to avoid having temporary files:
- There might well not be enough space for a temp file.
- It might be desirable to start the transfer even before all input has come in from
stdin
-- this is currently not done because the complete temp file is written first and then transfered.
I realize this requires additional features in the croc
protocol; specifically, the transfer of files of unknown size must be implemented. Also, re-starting a transfer gracefully (i. e., skipping over those blocks already transfered) is obviously impossible.
However, I think it would be a very good feature to have indeed.
would accept a PR for this
Honestly after stumbling on this issue, i would rather have croc not handle stdin at all. I think it is reasonable to expect such tool to be streaming data, not writing it to temp file. 😒
was wondering the same thing as the OP ... anyways, great tool, still useful even with temp file ;)
Stale issue message