From: jsimomaa Date: Mon, 26 Mar 2018 05:40:13 +0000 (+0300) Subject: Adding FileSystem and FileSystems to Files SCL-API X-Git-Tag: v1.43.0~136^2~522 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=d9856d2391ee17f815a43dad74d9dc6318a1878c;p=simantics%2Fplatform.git Adding FileSystem and FileSystems to Files SCL-API refs #7841 Change-Id: I8b2a02b68c29bb5be724def3e0c2d67b2b6c51e6 --- 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