import "Stream" import "Vector" import "Charset" importJava "java.nio.file.Path" where data Path @JavaName "getParent" getParentPath :: Path -> Path @JavaName "resolve" resolvePath :: Path -> String -> Path @JavaName "relativize" relativizePath :: Path -> Path -> Path toAbsolutePath :: Path -> Path @JavaName "toString" pathToString :: Path -> String importJava "java.nio.file.Paths" where @JavaName "get" paths :: String -> Vector String -> Path path :: String -> Path path path = paths path (vector []) importJava "java.nio.file.OpenOption" where data OpenOption importJava "java.nio.file.StandardOpenOption" where READ :: OpenOption WRITE :: OpenOption APPEND :: OpenOption TRUNCATE_EXISTING :: OpenOption CREATE :: OpenOption CREATE_NEW :: OpenOption DELETE_ON_CLOSE :: OpenOption SPARSE :: OpenOption SYNC :: OpenOption DSYNC :: OpenOption importJava "java.nio.file.CopyOption" where data CopyOption importJava "java.nio.file.LinkOption" where data LinkOption importJava "java.nio.file.StandardCopyOption" where REPLACE_EXISTING :: CopyOption COPY_ATTRIBUTES :: CopyOption ATOMIC_MOVE :: CopyOption importJava "java.nio.file.LinkOption" where NOFOLLOW_LINKS :: CopyOption // OpenOption importJava "java.nio.file.attribute.FileAttribute" where data FileAttribute importJava "java.nio.file.Files" where @JavaName newInputStream newInputStreamWithOpenOptions :: Path -> Vector OpenOption -> InputStream @JavaName newOutputStream newOutputStreamWithOpenOptions :: Path -> Vector OpenOption -> OutputStream @JavaName createFile createFileWithFileAttributes :: Path -> Vector FileAttribute -> Path @JavaName createDirectory createDirectoryWithFileAttributes :: Path -> Vector FileAttribute -> Path @JavaName createDirectories createDirectoriesWithFileAttributes :: Path -> Vector FileAttribute -> Path @JavaName createTempFile createTempFileWithFileAttributes :: String -> String -> Vector FileAttribute -> Path delete :: Path -> () deleteIfExists :: Path -> Boolean @JavaName copy copyWithCopyOptions :: Path -> Path -> Vector CopyOption -> Path @JavaName move moveWithCopyOptions :: Path -> Path -> Vector CopyOption -> Path size :: Path -> Long @JavaName exists existsWithLinkOptions :: Path -> Vector LinkOption -> Boolean @JavaName notExists notExistsWithLinkOptions :: Path -> Vector LinkOption -> Boolean isReadable :: Path -> Boolean isWritable :: Path -> Boolean isExecutable :: Path -> Boolean // Simupedia has BufferedReader.scl module which contains BufferedReader // newBufferedReader :: Path -> Charset -> BufferedReader // newBufferedReader :: Path -> BufferedReader @JavaName copy copyInputStreamWithCopyOptions :: InputStream -> Path -> Vector CopyOption -> Long @JavaName copy copyToOutputStream :: Path -> OutputStream -> Long readAllBytes :: Path -> Vector Byte write :: Path -> Vector Byte -> Vector OpenOption -> () @JavaName readAllLines readAllLinesWithCharset :: Path -> Charset -> [String] readAllLines :: Path -> [String] @JavaName write writeBytesWithOpenOptions :: Path -> Vector Byte -> Vector OpenOption -> Path newInputStream :: Path -> InputStream newInputStream path = newInputStreamWithOpenOptions path (vector []) newOutputStream :: Path -> OutputStream newOutputStream path = newOutputStreamWithOpenOptions path (vector []) createFile :: Path -> Path createFile path = createFileWithFileAttributes path (vector []) createDirectory :: Path -> Path createDirectory path = createDirectoryWithFileAttributes path (vector []) createDirectories :: Path -> Path createDirectories path = createDirectoriesWithFileAttributes path (vector []) createTempFile :: String -> String -> Path createTempFile prefix suffix = createTempFileWithFileAttributes prefix suffix (vector []) copy :: Path -> Path -> Path copy source target = copyWithCopyOptions source target (vector []) move :: Path -> Path -> Path move source target = moveWithCopyOptions source target (vector []) exists :: Path -> Boolean exists path = existsWithLinkOptions path (vector []) notExists :: Path -> Boolean notExists path = notExistsWithLinkOptions path (vector [])