dan200.computercraft.api.filesystem.IWritableMount Java Examples

The following examples show how to use dan200.computercraft.api.filesystem.IWritableMount. 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 File: ComputerCraftAPI.java    From OpenPeripheral-Integration with 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 File: ComputerCraftAPI.java    From Framez with 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
Source File: ComputerCraftAPI.java    From PneumaticCraft with 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 #4
Source File: ComputerCraftAPI.java    From OpenPeripheral-Addons with 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 File: ComputerCraftAPI.java    From BigReactors with 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 File: ComputerCraftAPI.java    From OpenPeripheral with 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 File: IComputerAccess.java    From OpenPeripheral-Integration with 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 File: IComputerAccess.java    From OpenPeripheral-Integration with MIT License 2 votes vote down vote up
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );
 
Example #9
Source File: IComputerAccess.java    From Framez with 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
Source File: IComputerAccess.java    From PneumaticCraft with 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 #11
Source File: IComputerAccess.java    From OpenPeripheral-Addons with 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 File: IComputerAccess.java    From OpenPeripheral-Addons with MIT License 2 votes vote down vote up
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );
 
Example #13
Source File: IComputerAccess.java    From BigReactors with 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 File: IComputerAccess.java    From OpenPeripheral with 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 File: IComputerAccess.java    From OpenPeripheral with MIT License 2 votes vote down vote up
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );