orangy
Ruckus
02/24/2019, 10:06 PMorangy
jw
02/25/2019, 3:21 AMmsink
02/25/2019, 5:11 AMorangy
In-memory for tests👍
Zip for reading/writing zips as if they’re just normal folders preventing the need to special case themThat’s something I’m not sure about. It requires some special and non-trivial handling of paths, like if I have
/foo/bar/baz.zip!/a/b/c.txt
and then nested zips within zips, etc, etc. I don’t think we will have it in some first version. But ZipFS to open a zip file as a separate FileSystem
instance and working with it like with an isolated FS will be there.
Reading resources, on Native from `binaryBlob`sDo you mean specially crafted resource files, like in games (e.g. WAD)?
msink
02/26/2019, 1:09 PMDo you mean specially crafted resource files, like in games (e.g. WAD)No, I mean on JVM - resources from jar, on Native something similar, readonly in-memory filesystem compiled and linked to executable file as map (resname : String -> resvalue: CValues)
orangy
processedResources
folder, but not placed into executable. You can zip this folder and use ZipFS to access data.jw
02/26/2019, 1:51 PMbasher
02/26/2019, 5:03 PMorangy
jessewilson
03/21/2019, 2:56 PMjw
03/21/2019, 3:04 PMtoString()
the relative Path from the FileSystem A and resolve a child on the FileSystem B using the string form. Happens when mounting zip/jar/aars as FileSystems all the time.orangy
Path
, such as myFile.openInput()
, and user will have to pass around FileSystem
instance around. Of course, convenience API could use default FS, but then most of code will be doing exactly this.
Second, there are properties on the Path
that depend on the File System, such as \
or /
, allowed characters, etc. This is lesser problem, implementation could accept both separators, but then how to implement toString()
? Should it be toString(fs)
?
I don’t say it’s impossible to solve this, or prove it is not solvable, I just didn’t give it enough thought yet. I did what’s easiest to have it working somehow.Path
and File
, so that Path
is just that, a slash-separated string, and File
is a pointer into a file system.jessewilson
03/21/2019, 10:56 PMFileSystem.SYSTEM.open(path)
isn’t short but it's very straightforwardorangy
FileSystem
instance around. This is a major inconvenience. Instead of having a function like fun loadData(path: Path)
or even fun Path.loadData()
you will have to have fun Path.loadData(fs: FileSystem)
and pass these two parameters all they way down to the code that opens a stream. Also, working with nullable paths becomes a pain.