X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.runtime%2Fscl%2FFiles.scl;h=d1bc885616e2d34c91c2e633fe2939ece0a6d4e9;hp=069076fefdd2edaf261e6c62e4a21aa00a15cc6a;hb=d9856d2391ee17f815a43dad74d9dc6318a1878c;hpb=5d9fc12394233b008d38f43105d971a6ab8dfae6 diff --git a/bundles/org.simantics.scl.runtime/scl/Files.scl b/bundles/org.simantics.scl.runtime/scl/Files.scl index 069076fef..d1bc88561 100644 --- a/bundles/org.simantics.scl.runtime/scl/Files.scl +++ b/bundles/org.simantics.scl.runtime/scl/Files.scl @@ -59,6 +59,25 @@ importJava "java.nio.file.LinkOption" where importJava "java.nio.file.attribute.FileAttribute" where data FileAttribute +importJava "java.nio.file.FileSystem" where + data FileSystem + + @JavaName close + closeFileSystem :: FileSystem -> () + + @JavaName getPath + getPathFromFileSystem :: FileSystem -> String -> Vector String -> 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 -> InputStream