Java源码示例:dan200.computercraft.api.filesystem.IWritableMount

示例1
/**
 * 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;
}
 
示例2
/**
 * 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;
}
 
示例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;
}
 
示例4
/**
 * 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;
}
 
示例5
/**
 * 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;
}
 
示例6
/**
 * 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;
}
 
示例7
/**
 * 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 );
 
示例8
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );
 
示例9
/**
 * 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 );
 
示例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 );
 
示例11
/**
 * 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 );
 
示例12
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );
 
示例13
/**
 * 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 );
 
示例14
/**
 * 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 );
 
示例15
/**
 * TODO: Document me
 */
public String mountWritable( String desiredLocation, IWritableMount mount, String driveName );