batteries icon indicating copy to clipboard operation
batteries copied to clipboard

copyFile

Open lovettchris opened this issue 3 years ago • 0 comments

Doing this on thousands of files would be very slow:

def copyFile (src : FilePath) (dst : FilePath) : IO Unit := do
  IO.FS.writeFile dst (← IO.FS.readFile src)

Would be better to use an operating system call here instead implemented in C++ like https://en.cppreference.com/w/cpp/filesystem/copy_file

And libraries usually add copy directory also: https://en.cppreference.com/w/cpp/filesystem/copy

lovettchris avatar Sep 01 '22 01:09 lovettchris