public interface FileSystemAPI
Modifier and Type | Method and Description |
---|---|
ManagedEnvironment |
asManagedEnvironment(FileSystem fileSystem)
Deprecated.
Don't use this directly, use the wrapper in
FileSystem . |
ManagedEnvironment |
asManagedEnvironment(FileSystem fileSystem,
Label label)
Deprecated.
Don't use this directly, use the wrapper in
FileSystem . |
ManagedEnvironment |
asManagedEnvironment(FileSystem fileSystem,
Label label,
EnvironmentHost host,
java.lang.String accessSound)
Deprecated.
Don't use this directly, use the wrapper in
FileSystem . |
ManagedEnvironment |
asManagedEnvironment(FileSystem fileSystem,
Label label,
EnvironmentHost host,
java.lang.String accessSound,
int speed)
Creates a network node that makes the specified file system available via
the common file system driver.
|
ManagedEnvironment |
asManagedEnvironment(FileSystem fileSystem,
java.lang.String label)
Deprecated.
Don't use this directly, use the wrapper in
FileSystem . |
ManagedEnvironment |
asManagedEnvironment(FileSystem fileSystem,
java.lang.String label,
EnvironmentHost host,
java.lang.String accessSound)
Deprecated.
Don't use this directly, use the wrapper in
FileSystem . |
ManagedEnvironment |
asManagedEnvironment(FileSystem fileSystem,
java.lang.String label,
EnvironmentHost host,
java.lang.String accessSound,
int speed)
Creates a network node that makes the specified file system available via
the common file system driver.
|
FileSystem |
asReadOnly(FileSystem fileSystem)
Wrap a file system retrieved via one of the from??? methods to
make it read-only.
|
FileSystem |
fromMemory(long capacity)
Creates a new writable file system that resides in memory.
|
FileSystem |
fromResource(net.minecraft.util.ResourceLocation location)
Creates a new file system based on a mod-specific resource location where
the namespace refers to the mod and the resource path denotes a
(mandatory) subpath relative to that mod's assets directory.
|
FileSystem |
fromSaveDirectory(java.lang.String root,
long capacity,
boolean buffered)
Creates a new writable file system in the save folder.
|
FileSystem fromResource(net.minecraft.util.ResourceLocation location)
location
is stored in a JAR file, this will create a read-only
file system based on that JAR file. If location
is stored in the
native file system, this will create a read-only file system from the the
location constructed as described above (relative to the root of the
namespace).
location
- the location where the file system's contents are stored.FileSystem fromSaveDirectory(java.lang.String root, long capacity, boolean buffered)
"saves/" + WORLD_NAME + "/opencomputers/" + rootThe first part may differ, in particular for servers.
root
- the name of the file system.capacity
- the amount of space in bytes to allow being used.buffered
- whether data should only be written to disk when saving.FileSystem fromMemory(long capacity)
capacity
- the capacity of the file system.FileSystem asReadOnly(FileSystem fileSystem)
fileSystem
- the file system to wrap.ManagedEnvironment asManagedEnvironment(FileSystem fileSystem, Label label, EnvironmentHost host, java.lang.String accessSound, int speed)
fileSystem
- the file system to wrap.label
- the label of the file system.host
- the tile entity containing the file system.accessSound
- the name of the sound effect to play when the file
system is accessed. This has to be the fully
qualified resource name, e.g.
opencomputers:floppy_access.speed
- the speed multiplier for this file system.ManagedEnvironment asManagedEnvironment(FileSystem fileSystem, java.lang.String label, EnvironmentHost host, java.lang.String accessSound, int speed)
fileSystem
- the file system to wrap.label
- the read-only label of the file system.host
- the tile entity containing the file system.accessSound
- the name of the sound effect to play when the file
system is accessed. This has to be the fully
qualified resource name, e.g.
opencomputers:floppy_access.speed
- the speed multiplier for this file system.@Deprecated ManagedEnvironment asManagedEnvironment(FileSystem fileSystem, Label label, EnvironmentHost host, java.lang.String accessSound)
FileSystem
.@Deprecated ManagedEnvironment asManagedEnvironment(FileSystem fileSystem, java.lang.String label, EnvironmentHost host, java.lang.String accessSound)
FileSystem
.@Deprecated ManagedEnvironment asManagedEnvironment(FileSystem fileSystem, Label label)
FileSystem
.@Deprecated ManagedEnvironment asManagedEnvironment(FileSystem fileSystem, java.lang.String label)
FileSystem
.@Deprecated ManagedEnvironment asManagedEnvironment(FileSystem fileSystem)
FileSystem
.