importJava "java.nio.file.Path" where
data Path
+
+ @JavaName "getParent"
+ getParentPath :: Path -> <Proc> Path
+
+ @JavaName "resolve"
+ resolvePath :: Path -> String -> <Proc> Path
+
+ @JavaName "relativize"
+ relativizePath :: Path -> Path -> <Proc> Path
+
+ toAbsolutePath :: Path -> <Proc> Path
+
+ @JavaName "toString"
+ pathToString :: Path -> <Proc> String
importJava "java.nio.file.Paths" where
importJava "java.nio.file.attribute.FileAttribute" where
data FileAttribute
+importJava "java.nio.file.FileSystem" where
+ data FileSystem
+
+ @JavaName close
+ closeFileSystem :: FileSystem -> <Proc> ()
+
+ @JavaName getPath
+ getPathFromFileSystem :: FileSystem -> String -> Vector String -> <Proc> Path
+
+importJava "java.lang.ClassLoader" where
+ @private
+ data ClassLoader
+
+importJava "java.nio.file.FileSystems" where
+ @private
+ newFileSystem :: Path -> Maybe ClassLoader -> FileSystem
+
+newFileSystemFromPath path = newFileSystem path Nothing
+
importJava "java.nio.file.Files" where
@JavaName newInputStream
newInputStreamWithOpenOptions :: Path -> Vector OpenOption -> <Proc, Exception> InputStream
createDirectoriesWithFileAttributes :: Path -> Vector FileAttribute -> <Proc, Exception> Path
@JavaName createTempFile
- createTempFileWithFileAttributes :: Path -> String -> String -> Vector FileAttribute -> <Proc, Exception> Path
+ createTempFileWithFileAttributes :: String -> String -> Vector FileAttribute -> <Proc, Exception> Path
delete :: Path -> <Proc, Exception> ()
copyToOutputStream :: Path -> OutputStream -> <Proc, Exception> Long
readAllBytes :: Path -> <Proc, Exception> Vector Byte
+ write :: Path -> Vector Byte -> Vector OpenOption -> <Proc,Exception> ()
@JavaName readAllLines
readAllLinesWithCharset :: Path -> Charset -> <Proc, Exception> [String]
createDirectories :: Path -> <Proc, Exception> Path
createDirectories path = createDirectoriesWithFileAttributes path (vector [])
-createTempFile :: Path -> String -> String -> <Proc, Exception> Path
-createTempFile dir prefix suffix = createTempFileWithFileAttributes dir prefix suffix (vector [])
+createTempFile :: String -> String -> <Proc, Exception> Path
+createTempFile prefix suffix = createTempFileWithFileAttributes prefix suffix (vector [])
copy :: Path -> Path -> <Proc, Exception> Path
copy source target = copyWithCopyOptions source target (vector [])