Closed aslilac closed 11 months ago
This issue is related to #12
What's the mechanism by which you want this to occur? I mean should this function execute the cp
command, or read the contents of the file to a buffer and write it to the new file, or maybe something fancy with streams?
Asking just because I truly want to know what would be more useful.
does erlang not provide a copy function? I know node and deno both do, which just maps to a syscall
I'd just expect it to map to whatever file-copy implementation the platform provides
It does lol, just wanted to make sure that's what you wanted :) I should have these published sometime today it seems extremely straightforward.
thx bestie :3
Pssst this is published now as copy_file
.
For making sure the directory exists I would use is_directory
or create_directory_all
depending on how you want to handle it.
something like
fn(String, to: String) -> Result(Nil, _)
it'd be great if it could make sure the directory containing
to
exists as well