Java Code Examples for dan200.computercraft.api.filesystem.IWritableMount

The following examples show how to use dan200.computercraft.api.filesystem.IWritableMount. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: OpenPeripheral-Integration   Source File: ComputerCraftAPI.java    License: MIT License 3 votes vote down vote up
/**
 * Creates a file system mount that maps to a subfolder of the save directory for a given world, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a folder from the
 * users save directory onto a computers file system.<br>
 * @param world The world for which the save dir can be found. This should be the serverside world object.
 * @param subPath The folder path within the save directory that the mount should map to. eg: "computer/disk/42".<br>
 * Use createUniqueNumberedSaveDir() to create a new numbered folder to use.
 * @param capacity The ammount of data that can be stored in the directory before it fills up, in bytes.
 * @return The mount, or null if it could be created for some reason. Use IComputerAccess.mount() or IComputerAccess.mountWritable()
 * to mount this on a Computers' file system.
 * @see #createUniqueNumberedSaveDir(World, String)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 * @see IWritableMount
 */
public static IWritableMount createSaveDirMount( World world, String subPath, long capacity )
{
	findCC();
	if( computerCraft_createSaveDirMount != null )
	{
		try {
			return (IWritableMount)computerCraft_createSaveDirMount.invoke( null, world, subPath, capacity );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example 2
Source Project: Framez   Source File: ComputerCraftAPI.java    License: GNU General Public License v3.0 3 votes vote down vote up
/**
 * Creates a file system mount that maps to a subfolder of the save directory for a given world, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a folder from the
 * users save directory onto a computers file system.<br>
 * @param world The world for which the save dir can be found. This should be the serverside world object.
 * @param subPath The folder path within the save directory that the mount should map to. eg: "computer/disk/42".<br>
 * Use createUniqueNumberedSaveDir() to create a new numbered folder to use.
 * @param capacity The ammount of data that can be stored in the directory before it fills up, in bytes.
 * @return The mount, or null if it could be created for some reason. Use IComputerAccess.mount() or IComputerAccess.mountWritable()
 * to mount this on a Computers' file system.
 * @see #createUniqueNumberedSaveDir(World, String)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 * @see IWritableMount
 */
public static IWritableMount createSaveDirMount( World world, String subPath, long capacity )
{
	findCC();
	if( computerCraft_createSaveDirMount != null )
	{
		try {
			return (IWritableMount)computerCraft_createSaveDirMount.invoke( null, world, subPath, capacity );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example 3
/**
 * Creates a file system mount that maps to a subfolder of the save directory for a given world, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a folder from the
 * users save directory onto a computers file system.<br>
 * @param world The world for which the save dir can be found. This should be the serverside world object.
 * @param subPath The folder path within the save directory that the mount should map to. eg: "computer/disk/42".<br>
 * Use createUniqueNumberedSaveDir() to create a new numbered folder to use.
 * @param capacity The ammount of data that can be stored in the directory before it fills up, in bytes.
 * @return The mount, or null if it could be created for some reason. Use IComputerAccess.mount() or IComputerAccess.mountWritable()
 * to mount this on a Computers' file system.
 * @see #createUniqueNumberedSaveDir(World, String)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 * @see IWritableMount
 */
public static IWritableMount createSaveDirMount( World world, String subPath, long capacity )
{
	findCC();
	if( computerCraft_createSaveDirMount != null )
	{
		try {
			return (IWritableMount)computerCraft_createSaveDirMount.invoke( null, world, subPath, capacity );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example 4
Source Project: OpenPeripheral-Addons   Source File: ComputerCraftAPI.java    License: MIT License 3 votes vote down vote up
/**
 * Creates a file system mount that maps to a subfolder of the save directory for a given world, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a folder from the
 * users save directory onto a computers file system.<br>
 * @param world The world for which the save dir can be found. This should be the serverside world object.
 * @param subPath The folder path within the save directory that the mount should map to. eg: "computer/disk/42".<br>
 * Use createUniqueNumberedSaveDir() to create a new numbered folder to use.
 * @param capacity The ammount of data that can be stored in the directory before it fills up, in bytes.
 * @return The mount, or null if it could be created for some reason. Use IComputerAccess.mount() or IComputerAccess.mountWritable()
 * to mount this on a Computers' file system.
 * @see #createUniqueNumberedSaveDir(World, String)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 * @see IWritableMount
 */
public static IWritableMount createSaveDirMount( World world, String subPath, long capacity )
{
	findCC();
	if( computerCraft_createSaveDirMount != null )
	{
		try {
			return (IWritableMount)computerCraft_createSaveDirMount.invoke( null, world, subPath, capacity );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example 5
Source Project: BigReactors   Source File: ComputerCraftAPI.java    License: MIT License 3 votes vote down vote up
/**
 * Creates a file system mount that maps to a subfolder of the save directory for a given world, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a folder from the
 * users save directory onto a computers file system.<br>
 * @param world The world for which the save dir can be found. This should be the serverside world object.
 * @param subPath The folder path within the save directory that the mount should map to. eg: "computer/disk/42".<br>
 * Use createUniqueNumberedSaveDir() to create a new numbered folder to use.
 * @param capacity The ammount of data that can be stored in the directory before it fills up, in bytes.
 * @return The mount, or null if it could be created for some reason. Use IComputerAccess.mount() or IComputerAccess.mountWritable()
 * to mount this on a Computers' file system.
 * @see #createUniqueNumberedSaveDir(World, String)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 * @see IWritableMount
 */
public static IWritableMount createSaveDirMount( World world, String subPath, long capacity )
{
	findCC();
	if( computerCraft_createSaveDirMount != null )
	{
		try {
			return (IWritableMount)computerCraft_createSaveDirMount.invoke( null, world, subPath, capacity );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example 6
Source Project: OpenPeripheral   Source File: ComputerCraftAPI.java    License: MIT License 3 votes vote down vote up
/**
 * Creates a file system mount that maps to a subfolder of the save directory for a given world, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a folder from the
 * users save directory onto a computers file system.<br>
 * @param world The world for which the save dir can be found. This should be the serverside world object.
 * @param subPath The folder path within the save directory that the mount should map to. eg: "computer/disk/42".<br>
 * Use createUniqueNumberedSaveDir() to create a new numbered folder to use.
 * @param capacity The ammount of data that can be stored in the directory before it fills up, in bytes.
 * @return The mount, or null if it could be created for some reason. Use IComputerAccess.mount() or IComputerAccess.mountWritable()
 * to mount this on a Computers' file system.
 * @see #createUniqueNumberedSaveDir(World, String)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, dan200.computercraft.api.filesystem.IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 * @see IWritableMount
 */
public static IWritableMount createSaveDirMount( World world, String subPath, long capacity )
{
	findCC();
	if( computerCraft_createSaveDirMount != null )
	{
		try {
			return (IWritableMount)computerCraft_createSaveDirMount.invoke( null, world, subPath, capacity );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example 7
Source Project: OpenPeripheral-Integration   Source File: IComputerAccess.java    License: MIT License 2 votes vote down vote up
/**
 * Mount a mount onto the computers' file system in a writable mode.<br>
 * @param desiredLocation The location on the computercraft's file system where you would like the mount to be mounted.
 * @param mount The mount object to mount on the computercraft. These can be obtained by calling ComputerCraftAPI.createSaveDirMount() or by creating your own objects that implement the IWritableMount interface.
 * @return The location on the computercraft's file system where you the mount mounted, or null if there was already a file in the desired location. Store this value if you wish to unmount the mount later.
 * @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
 * @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
 * @see #mount(String, IMount)
 * @see #unmount(String)
 * @see IMount
 */
public String mountWritable( String desiredLocation, IWritableMount mount );
 
Example 8
Source Project: OpenPeripheral-Integration   Source File: IComputerAccess.java    License: MIT License 2 votes vote down vote up
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );
 
Example 9
Source Project: Framez   Source File: IComputerAccess.java    License: GNU General Public License v3.0 2 votes vote down vote up
/**
 * Mount a mount onto the computers' file system in a writable mode.<br>
 * @param desiredLocation The location on the computercraft's file system where you would like the mount to be mounted.
 * @param mount The mount object to mount on the computercraft. These can be obtained by calling ComputerCraftAPI.createSaveDirMount() or by creating your own objects that implement the IWritableMount interface.
 * @return The location on the computercraft's file system where you the mount mounted, or null if there was already a file in the desired location. Store this value if you wish to unmount the mount later.
 * @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
 * @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
 * @see #mount(String, IMount)
 * @see #unmount(String)
 * @see IMount
 */
public String mountWritable( String desiredLocation, IWritableMount mount );
 
Example 10
/**
 * Mount a mount onto the computers' file system in a writable mode.<br>
 * @param desiredLocation The location on the computercraft's file system where you would like the mount to be mounted.
 * @param mount The mount object to mount on the computercraft. These can be obtained by calling ComputerCraftAPI.createSaveDirMount() or by creating your own objects that implement the IWritableMount interface.
 * @return The location on the computercraft's file system where you the mount mounted, or null if there was already a file in the desired location. Store this value if you wish to unmount the mount later.
 * @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
 * @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
 * @see #mount(String, IMount)
 * @see #unmount(String)
 * @see IMount
 */
public String mountWritable( String desiredLocation, IWritableMount mount );
 
Example 11
Source Project: OpenPeripheral-Addons   Source File: IComputerAccess.java    License: MIT License 2 votes vote down vote up
/**
 * Mount a mount onto the computers' file system in a writable mode.<br>
 * @param desiredLocation The location on the computercraft's file system where you would like the mount to be mounted.
 * @param mount The mount object to mount on the computercraft. These can be obtained by calling ComputerCraftAPI.createSaveDirMount() or by creating your own objects that implement the IWritableMount interface.
 * @return The location on the computercraft's file system where you the mount mounted, or null if there was already a file in the desired location. Store this value if you wish to unmount the mount later.
 * @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
 * @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
 * @see #mount(String, IMount)
 * @see #unmount(String)
 * @see IMount
 */
public String mountWritable( String desiredLocation, IWritableMount mount );
 
Example 12
Source Project: OpenPeripheral-Addons   Source File: IComputerAccess.java    License: MIT License 2 votes vote down vote up
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );
 
Example 13
Source Project: BigReactors   Source File: IComputerAccess.java    License: MIT License 2 votes vote down vote up
/**
 * Mount a mount onto the computers' file system in a writable mode.<br>
 * @param desiredLocation The location on the computercraft's file system where you would like the mount to be mounted.
 * @param mount The mount object to mount on the computercraft. These can be obtained by calling ComputerCraftAPI.createSaveDirMount() or by creating your own objects that implement the IWritableMount interface.
 * @return The location on the computercraft's file system where you the mount mounted, or null if there was already a file in the desired location. Store this value if you wish to unmount the mount later.
 * @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
 * @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
 * @see #mount(String, IMount)
 * @see #unmount(String)
 * @see IMount
 */
public String mountWritable( String desiredLocation, IWritableMount mount );
 
Example 14
Source Project: OpenPeripheral   Source File: IComputerAccess.java    License: MIT License 2 votes vote down vote up
/**
 * Mount a mount onto the computers' file system in a writable mode.<br>
 * @param desiredLocation The location on the computercraft's file system where you would like the mount to be mounted.
 * @param mount The mount object to mount on the computercraft. These can be obtained by calling ComputerCraftAPI.createSaveDirMount() or by creating your own objects that implement the IWritableMount interface.
 * @return The location on the computercraft's file system where you the mount mounted, or null if there was already a file in the desired location. Store this value if you wish to unmount the mount later.
 * @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String)
 * @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
 * @see #mount(String, IMount)
 * @see #unmount(String)
 * @see IMount
 */
public String mountWritable( String desiredLocation, IWritableMount mount );
 
Example 15
Source Project: OpenPeripheral   Source File: IComputerAccess.java    License: MIT License 2 votes vote down vote up
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );