5 importJava "java.io.File" where
12 childFile :: File -> String -> File
15 nameOfFile :: File -> String
18 pathOfFile :: File -> String
20 @JavaName "getAbsolutePath"
24 parentFile :: File -> String
27 fileExists :: File -> <Proc> Boolean
29 @JavaName createNewFile
30 createFile :: File -> <Proc> ()
33 sizeOfFile :: File -> <Proc> Long
35 @JavaName createTempFile
36 createTempFile :: String -> String -> Maybe File -> <Proc> File
38 @JavaName deleteOnExit
39 deleteFileOnExit :: File -> <Proc> ()
42 deleteFile :: File -> <Proc> ()
45 makeDirs :: File -> <Proc> Boolean
47 isFile :: File -> <Proc> Boolean
48 isDirectory :: File -> <Proc> Boolean
52 listMaybeFiles :: File -> <Proc> Maybe (Vector File)
54 listFiles :: File -> <Proc> Vector File
56 match listMaybeFiles filees with
60 importJava "org.simantics.scl.runtime.io.FileIO" where
61 copyFile :: File -> File -> <Proc> ()
62 moveFile :: File -> File -> <Proc> ()
63 syncFile :: File -> <Proc> ()
64 createTempDirectory :: String -> Maybe File -> <Proc> File
67 pwd () = cwd (file "")
69 instance Show File where
72 importJava "java.io.FileInputStream" where
75 openFileForReading :: File -> InputStream
77 instance Readable File where
78 openForReading = openFileForReading
80 importJava "java.io.FileOutputStream" where
83 openFileForWriting :: File -> OutputStream
85 instance Writable File where
86 openForWriting = openFileForWriting