5 importJava "java.nio.file.Path" where
9 getParentPath :: Path -> <Proc> Path
12 resolvePath :: Path -> String -> <Proc> Path
14 @JavaName "relativize"
15 relativizePath :: Path -> Path -> <Proc> Path
17 toAbsolutePath :: Path -> <Proc> Path
20 pathToString :: Path -> <Proc> String
22 importJava "java.nio.file.Paths" where
25 paths :: String -> Vector String -> Path
27 path :: String -> Path
28 path path = paths path (vector [])
30 importJava "java.nio.file.OpenOption" where
33 importJava "java.nio.file.StandardOpenOption" where
37 TRUNCATE_EXISTING :: OpenOption
39 CREATE_NEW :: OpenOption
40 DELETE_ON_CLOSE :: OpenOption
45 importJava "java.nio.file.CopyOption" where
48 importJava "java.nio.file.LinkOption" where
51 importJava "java.nio.file.StandardCopyOption" where
52 REPLACE_EXISTING :: CopyOption
53 COPY_ATTRIBUTES :: CopyOption
54 ATOMIC_MOVE :: CopyOption
56 importJava "java.nio.file.LinkOption" where
57 NOFOLLOW_LINKS :: CopyOption // OpenOption
59 importJava "java.nio.file.attribute.FileAttribute" where
62 importJava "java.nio.file.FileSystem" where
66 closeFileSystem :: FileSystem -> <Proc> ()
69 getPathFromFileSystem :: FileSystem -> String -> Vector String -> <Proc> Path
71 importJava "java.lang.ClassLoader" where
75 importJava "java.nio.file.FileSystems" where
77 newFileSystem :: Path -> Maybe ClassLoader -> FileSystem
79 newFileSystemFromPath path = newFileSystem path Nothing
81 importJava "java.nio.file.Files" where
82 @JavaName newInputStream
83 newInputStreamWithOpenOptions :: Path -> Vector OpenOption -> <Proc, Exception> InputStream
85 @JavaName newOutputStream
86 newOutputStreamWithOpenOptions :: Path -> Vector OpenOption -> <Proc, Exception> OutputStream
89 createFileWithFileAttributes :: Path -> Vector FileAttribute -> <Proc, Exception> Path
91 @JavaName createDirectory
92 createDirectoryWithFileAttributes :: Path -> Vector FileAttribute -> <Proc, Exception> Path
94 @JavaName createDirectories
95 createDirectoriesWithFileAttributes :: Path -> Vector FileAttribute -> <Proc, Exception> Path
97 @JavaName createTempFile
98 createTempFileWithFileAttributes :: String -> String -> Vector FileAttribute -> <Proc, Exception> Path
100 delete :: Path -> <Proc, Exception> ()
102 deleteIfExists :: Path -> <Proc, Exception> Boolean
105 copyWithCopyOptions :: Path -> Path -> Vector CopyOption -> <Proc, Exception> Path
108 moveWithCopyOptions :: Path -> Path -> Vector CopyOption -> <Proc, Exception> Path
110 size :: Path -> <Proc, Exception> Long
113 existsWithLinkOptions :: Path -> Vector LinkOption -> <Proc> Boolean
116 notExistsWithLinkOptions :: Path -> Vector LinkOption -> <Proc> Boolean
118 isReadable :: Path -> <Proc> Boolean
120 isWritable :: Path -> <Proc> Boolean
122 isExecutable :: Path -> <Proc> Boolean
124 // Simupedia has BufferedReader.scl module which contains BufferedReader
125 // newBufferedReader :: Path -> Charset -> <Proc> BufferedReader
126 // newBufferedReader :: Path -> <Proc> BufferedReader
129 copyInputStreamWithCopyOptions :: InputStream -> Path -> Vector CopyOption -> <Proc, Exception> Long
132 copyToOutputStream :: Path -> OutputStream -> <Proc, Exception> Long
134 readAllBytes :: Path -> <Proc, Exception> Vector Byte
135 write :: Path -> Vector Byte -> Vector OpenOption -> <Proc,Exception> ()
137 @JavaName readAllLines
138 readAllLinesWithCharset :: Path -> Charset -> <Proc, Exception> [String]
140 readAllLines :: Path -> <Proc, Exception> [String]
143 writeBytesWithOpenOptions :: Path -> Vector Byte -> Vector OpenOption -> <Proc, Exception> Path
145 newInputStream :: Path -> <Proc, Exception> InputStream
146 newInputStream path = newInputStreamWithOpenOptions path (vector [])
148 newOutputStream :: Path -> <Proc, Exception> OutputStream
149 newOutputStream path = newOutputStreamWithOpenOptions path (vector [])
151 createFile :: Path -> <Proc, Exception> Path
152 createFile path = createFileWithFileAttributes path (vector [])
154 createDirectory :: Path -> <Proc, Exception> Path
155 createDirectory path = createDirectoryWithFileAttributes path (vector [])
157 createDirectories :: Path -> <Proc, Exception> Path
158 createDirectories path = createDirectoriesWithFileAttributes path (vector [])
160 createTempFile :: String -> String -> <Proc, Exception> Path
161 createTempFile prefix suffix = createTempFileWithFileAttributes prefix suffix (vector [])
163 copy :: Path -> Path -> <Proc, Exception> Path
164 copy source target = copyWithCopyOptions source target (vector [])
166 move :: Path -> Path -> <Proc, Exception> Path
167 move source target = moveWithCopyOptions source target (vector [])
169 exists :: Path -> <Proc> Boolean
170 exists path = existsWithLinkOptions path (vector [])
172 notExists :: Path -> <Proc> Boolean
173 notExists path = notExistsWithLinkOptions path (vector [])