Class VirtualFilesystem
- java.lang.Object
-
- net.lax1dude.eaglercraft.v1_8.internal.vfs.VirtualFilesystem
-
public class VirtualFilesystem extends java.lang.Object
Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
VirtualFilesystem.AsyncHandlers
protected static class
VirtualFilesystem.DatabaseOpen
static class
VirtualFilesystem.VFSFile
static class
VirtualFilesystem.VFSHandle
protected static class
VirtualFilesystem.VirtualOutputStream
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
database
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected static IDBFactory
createIDBFactory()
static java.lang.String
CRLFtoLF(java.lang.String str)
boolean
deleteFile(java.lang.String path)
int
deleteFiles(java.lang.String prefix)
boolean
fileExists(java.lang.String path)
void
flushCache(long age)
VirtualFilesystem.VFSFile
getFile(java.lang.String path)
VirtualFilesystem.VFSFile
getFile(java.lang.String path, boolean cache)
int
iterateFiles(java.lang.String prefix, boolean rw, VFSIterator itr)
static java.lang.String[]
lines(java.lang.String str)
java.util.List<java.lang.String>
listFiles(java.lang.String prefix)
static VirtualFilesystem.VFSHandle
openVFS(java.lang.String db)
boolean
renameFile(java.lang.String oldName, java.lang.String newName, boolean copy)
int
renameFiles(java.lang.String oldPrefix, java.lang.String newPrefix, boolean copy)
static java.lang.String
utf8(byte[] str)
static byte[]
utf8(java.lang.String str)
-
-
-
Method Detail
-
openVFS
public static VirtualFilesystem.VFSHandle openVFS(java.lang.String db)
-
close
public void close()
-
getFile
public VirtualFilesystem.VFSFile getFile(java.lang.String path)
-
getFile
public VirtualFilesystem.VFSFile getFile(java.lang.String path, boolean cache)
-
renameFile
public boolean renameFile(java.lang.String oldName, java.lang.String newName, boolean copy)
-
deleteFile
public boolean deleteFile(java.lang.String path)
-
fileExists
public boolean fileExists(java.lang.String path)
-
listFiles
public java.util.List<java.lang.String> listFiles(java.lang.String prefix)
-
deleteFiles
public int deleteFiles(java.lang.String prefix)
-
iterateFiles
public int iterateFiles(java.lang.String prefix, boolean rw, VFSIterator itr)
-
renameFiles
public int renameFiles(java.lang.String oldPrefix, java.lang.String newPrefix, boolean copy)
-
flushCache
public void flushCache(long age)
-
createIDBFactory
protected static IDBFactory createIDBFactory()
-
utf8
public static byte[] utf8(java.lang.String str)
-
utf8
public static java.lang.String utf8(byte[] str)
-
CRLFtoLF
public static java.lang.String CRLFtoLF(java.lang.String str)
-
lines
public static java.lang.String[] lines(java.lang.String str)
-
-