mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-18 07:27:39 +00:00

ILuaAPI has been moved to dan200.computercraft.api.lua. One creates a new API by registering an instance of ILuaAPIFactory. This takes an instance of IComputerSystem and returns such an API. IComputerSystem is an extension of IComputerAccess, with methods to access additional information about the the computer, such as its label and filesystem.
39 lines
1.1 KiB
Java
39 lines
1.1 KiB
Java
package dan200.computercraft.api.filesystem;
|
|
|
|
import java.io.IOException;
|
|
|
|
/**
|
|
* Provides a mount of the entire computer's file system.
|
|
*
|
|
* This exists for use by various APIs - one should not attempt to mount it.
|
|
*/
|
|
public interface IFileSystem extends IWritableMount
|
|
{
|
|
/**
|
|
* Combine two paths together, reducing them into a normalised form.
|
|
*
|
|
* @param path The main path.
|
|
* @param child The path to append.
|
|
* @return The combined, normalised path.
|
|
*/
|
|
String combine( String path, String child );
|
|
|
|
/**
|
|
* Copy files from one location to another.
|
|
*
|
|
* @param from The location to copy from.
|
|
* @param to The location to copy to. This should not exist.
|
|
* @throws IOException If the copy failed.
|
|
*/
|
|
void copy( String from, String to ) throws IOException;
|
|
|
|
/**
|
|
* Move files from one location to another.
|
|
*
|
|
* @param from The location to move from.
|
|
* @param to The location to move to. This should not exist.
|
|
* @throws IOException If the move failed.
|
|
*/
|
|
void move( String from, String to ) throws IOException;
|
|
}
|