batteries
batteries copied to clipboard
copyFile
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