public interface IMount
dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
,
ComputerCraftAPI.createResourceMount(Class, String, String)
,
IComputerAccess.mount(String, IMount)
,
IWritableMount
Modifier and Type | Method and Description |
---|---|
boolean |
exists(java.lang.String path)
Returns whether a file with a given path exists or not.
|
long |
getSize(java.lang.String path)
Returns the size of a file with a given path, in bytes
|
boolean |
isDirectory(java.lang.String path)
Returns whether a file with a given path is a directory or not.
|
void |
list(java.lang.String path,
java.util.List<java.lang.String> contents)
Returns the file names of all the files in a directory.
|
java.io.InputStream |
openForRead(java.lang.String path)
Opens a file with a given path, and returns an inputstream representing it's contents.
|
boolean exists(java.lang.String path) throws java.io.IOException
path
- A file path in normalised format, relative to the mount location. ie: "programs/myprogram"java.io.IOException
boolean isDirectory(java.lang.String path) throws java.io.IOException
path
- A file path in normalised format, relative to the mount location. ie: "programs/myprograms"java.io.IOException
void list(java.lang.String path, java.util.List<java.lang.String> contents) throws java.io.IOException
path
- A file path in normalised format, relative to the mount location. ie: "programs/myprograms"contents
- A list of strings. Add all the file names to this listjava.io.IOException
long getSize(java.lang.String path) throws java.io.IOException
path
- A file path in normalised format, relative to the mount location. ie: "programs/myprogram"java.io.IOException
java.io.InputStream openForRead(java.lang.String path) throws java.io.IOException
path
- A file path in normalised format, relative to the mount location. ie: "programs/myprogram"java.io.IOException