Closed stanfea closed 9 years ago
Wasn't working was creating 0 byte files. Seems like an oversight since all the required code was in do-copy also it says io/copy is private and it wasn't passing the third opts paramater
The io/copy
function is the Clojure standard library public interface, while do-copy
is the (for some reason private) implementation multimethod. The call to io/copy
was intentional, going through the public interface when possible. There's no opts to pass in because the current implementation first opens input and output streams itself, leaving to io/copy
the job of just plumbing around the bytes.
This function as-is has a passing test, although it certainly isn't exhaustive (for one thing it doesn't even test passing in an explicit config). Would you mind adding to that test a case demonstrating the bug you are seeing in the current implementation?
working now. the problem was with something I fixed afterward. Sorry for the mixup!
No problem. FWIW BTW, most of the uses I had for this function have been replaced with dvals. If you haven't used them yet, it might be worth a look.
Could you explain a little more about what incorrect behavior you're seeing which your change fixes?