mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +03:00
3e1f6aba56
Co-authored-by: Stiopa Koltsov <stepan.koltsov@gmail.com>
22 lines
609 B
Idris
22 lines
609 B
Idris
module System.File
|
|
|
|
import Data.Buffer
|
|
|
|
import public System.File.Buffer
|
|
import public System.File.Error
|
|
import public System.File.Handle
|
|
import public System.File.Meta
|
|
import public System.File.Mode
|
|
import public System.File.Permissions
|
|
import public System.File.Process
|
|
import public System.File.ReadWrite
|
|
import public System.File.Types
|
|
import public System.File.Virtual
|
|
|
|
export
|
|
copyFile : HasIO io => String -> String -> io (Either FileError ())
|
|
copyFile src dest
|
|
= do Right buf <- createBufferFromFile src
|
|
| Left err => pure (Left err)
|
|
writeBufferToFile dest buf !(rawSize buf)
|