dan200.computercraft.api.filesystem.IMount Java Examples

The following examples show how to use dan200.computercraft.api.filesystem.IMount. 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 5 votes vote down vote up
/**
 * Creates a file system mount to a resource folder, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a resource folder onto a computers file system.<br>
 * The files in this mount will be a combination of files in the specified mod jar, and resource packs that contain resources with the same domain and path.<br>
 * @param modClass A class in whose jar to look first for the resources to mount. Using your main mod class is recommended. eg: MyMod.class
 * @param domain The domain under which to look for resources. eg: "mymod"
 * @param subPath The domain under which to look for resources. eg: "mymod/lua/myfiles"
 * @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 dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 */
public static IMount createResourceMount( Class modClass, String domain, String subPath )
{
	findCC();
	if( computerCraft_createResourceMount != null )
	{
		try {
			return (IMount)computerCraft_createResourceMount.invoke( null, modClass, domain, subPath );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example #2
Source File: ComputerCraftAPI.java    From Framez with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a file system mount to a resource folder, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a resource folder onto a computers file system.<br>
 * The files in this mount will be a combination of files in the specified mod jar, and resource packs that contain resources with the same domain and path.<br>
 * @param modClass A class in whose jar to look first for the resources to mount. Using your main mod class is recommended. eg: MyMod.class
 * @param domain The domain under which to look for resources. eg: "mymod"
 * @param subPath The domain under which to look for resources. eg: "mymod/lua/myfiles"
 * @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 dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 */
public static IMount createResourceMount( Class modClass, String domain, String subPath )
{
	findCC();
	if( computerCraft_createResourceMount != null )
	{
		try {
			return (IMount)computerCraft_createResourceMount.invoke( null, modClass, domain, subPath );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example #3
Source File: ComputerCraftAPI.java    From PneumaticCraft with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a file system mount to a resource folder, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a resource folder onto a computers file system.<br>
 * The files in this mount will be a combination of files in the specified mod jar, and resource packs that contain resources with the same domain and path.<br>
 * @param modClass A class in whose jar to look first for the resources to mount. Using your main mod class is recommended. eg: MyMod.class
 * @param domain The domain under which to look for resources. eg: "mymod"
 * @param subPath The domain under which to look for resources. eg: "mymod/lua/myfiles"
 * @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 dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 */
public static IMount createResourceMount( Class modClass, String domain, String subPath )
{
	findCC();
	if( computerCraft_createResourceMount != null )
	{
		try {
			return (IMount)computerCraft_createResourceMount.invoke( null, modClass, domain, subPath );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example #4
Source File: ComputerCraftAPI.java    From OpenPeripheral-Addons with MIT License 5 votes vote down vote up
/**
 * Creates a file system mount to a resource folder, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a resource folder onto a computers file system.<br>
 * The files in this mount will be a combination of files in the specified mod jar, and resource packs that contain resources with the same domain and path.<br>
 * @param modClass A class in whose jar to look first for the resources to mount. Using your main mod class is recommended. eg: MyMod.class
 * @param domain The domain under which to look for resources. eg: "mymod"
 * @param subPath The domain under which to look for resources. eg: "mymod/lua/myfiles"
 * @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 dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 */
public static IMount createResourceMount( Class modClass, String domain, String subPath )
{
	findCC();
	if( computerCraft_createResourceMount != null )
	{
		try {
			return (IMount)computerCraft_createResourceMount.invoke( null, modClass, domain, subPath );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example #5
Source File: ComputerCraftAPI.java    From BigReactors with MIT License 5 votes vote down vote up
/**
 * Creates a file system mount to a resource folder, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a resource folder onto a computers file system.<br>
 * The files in this mount will be a combination of files in the specified mod jar, and resource packs that contain resources with the same domain and path.<br>
 * @param modClass A class in whose jar to look first for the resources to mount. Using your main mod class is recommended. eg: MyMod.class
 * @param domain The domain under which to look for resources. eg: "mymod"
 * @param subPath The domain under which to look for resources. eg: "mymod/lua/myfiles"
 * @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 dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 */
public static IMount createResourceMount( Class modClass, String domain, String subPath )
{
	findCC();
	if( computerCraft_createResourceMount != null )
	{
		try {
			return (IMount)computerCraft_createResourceMount.invoke( null, modClass, domain, subPath );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example #6
Source File: ComputerCraftAPI.java    From OpenPeripheral with MIT License 5 votes vote down vote up
/**
 * Creates a file system mount to a resource folder, and returns it.<br>
 * Use in conjuction with IComputerAccess.mount() or IComputerAccess.mountWritable() to mount a resource folder onto a computers file system.<br>
 * The files in this mount will be a combination of files in the specified mod jar, and resource packs that contain resources with the same domain and path.<br>
 * @param modClass A class in whose jar to look first for the resources to mount. Using your main mod class is recommended. eg: MyMod.class
 * @param domain The domain under which to look for resources. eg: "mymod"
 * @param subPath The domain under which to look for resources. eg: "mymod/lua/myfiles"
 * @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 dan200.computercraft.api.peripheral.IComputerAccess#mount(String, dan200.computercraft.api.filesystem.IMount)
 * @see dan200.computercraft.api.peripheral.IComputerAccess#mountWritable(String, IWritableMount)
 * @see dan200.computercraft.api.filesystem.IMount
 */
public static IMount createResourceMount( Class modClass, String domain, String subPath )
{
	findCC();
	if( computerCraft_createResourceMount != null )
	{
		try {
			return (IMount)computerCraft_createResourceMount.invoke( null, modClass, domain, subPath );
		} catch (Exception e){
			// It failed
		}
	}
	return null;
}
 
Example #7
Source File: IMedia.java    From OpenPeripheral-Integration with MIT License 2 votes vote down vote up
/**
* If this disk represents an item with data (like a floppy disk), get a mount representing it's contents. This will be mounted onto the filesystem of the computercraft while the media is in the disk drive.
* @param stack The itemstack to inspect.
* @param world The world in which the item and disk drive reside.
* @return The mount, or null if this item does not represent an item with data. If the IMount returned also implements IWritableMount, it will mounted using mountWritable()
* @see dan200.computercraft.api.filesystem.IMount
* @see dan200.computercraft.api.filesystem.IWritableMount
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String, long)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
*/
  public IMount createDataMount( ItemStack stack, World world );
 
Example #8
Source File: IMedia.java    From Framez with GNU General Public License v3.0 2 votes vote down vote up
/**
* If this disk represents an item with data (like a floppy disk), get a mount representing it's contents. This will be mounted onto the filesystem of the computercraft while the media is in the disk drive.
* @param stack The itemstack to inspect.
* @param world The world in which the item and disk drive reside.
* @return The mount, or null if this item does not represent an item with data. If the IMount returned also implements IWritableMount, it will mounted using mountWritable()
* @see dan200.computercraft.api.filesystem.IMount
* @see dan200.computercraft.api.filesystem.IWritableMount
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String, long)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
*/
  public IMount createDataMount( ItemStack stack, World world );
 
Example #9
Source File: IMedia.java    From PneumaticCraft with GNU General Public License v3.0 2 votes vote down vote up
/**
* If this disk represents an item with data (like a floppy disk), get a mount representing it's contents. This will be mounted onto the filesystem of the computercraft while the media is in the disk drive.
* @param stack The itemstack to inspect.
* @param world The world in which the item and disk drive reside.
* @return The mount, or null if this item does not represent an item with data. If the IMount returned also implements IWritableMount, it will mounted using mountWritable()
* @see dan200.computercraft.api.filesystem.IMount
* @see dan200.computercraft.api.filesystem.IWritableMount
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String, long)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
*/
  public IMount createDataMount( ItemStack stack, World world );
 
Example #10
Source File: IMedia.java    From OpenPeripheral-Addons with MIT License 2 votes vote down vote up
/**
* If this disk represents an item with data (like a floppy disk), get a mount representing it's contents. This will be mounted onto the filesystem of the computercraft while the media is in the disk drive.
* @param stack The itemstack to inspect.
* @param world The world in which the item and disk drive reside.
* @return The mount, or null if this item does not represent an item with data. If the IMount returned also implements IWritableMount, it will mounted using mountWritable()
* @see dan200.computercraft.api.filesystem.IMount
* @see dan200.computercraft.api.filesystem.IWritableMount
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String, long)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
*/
  public IMount createDataMount( ItemStack stack, World world );
 
Example #11
Source File: IMedia.java    From BigReactors with MIT License 2 votes vote down vote up
/**
* If this disk represents an item with data (like a floppy disk), get a mount representing it's contents. This will be mounted onto the filesystem of the computercraft while the media is in the disk drive.
* @param stack The itemstack to inspect.
* @param world The world in which the item and disk drive reside.
* @return The mount, or null if this item does not represent an item with data. If the IMount returned also implements IWritableMount, it will mounted using mountWritable()
* @see dan200.computercraft.api.filesystem.IMount
* @see dan200.computercraft.api.filesystem.IWritableMount
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String, long)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
*/
  public IMount createDataMount( ItemStack stack, World world );
 
Example #12
Source File: IMedia.java    From OpenPeripheral with MIT License 2 votes vote down vote up
/**
* If this disk represents an item with data (like a floppy disk), get a mount representing it's contents. This will be mounted onto the filesystem of the computercraft while the media is in the disk drive.
* @param stack The itemstack to inspect.
* @param world The world in which the item and disk drive reside.
* @return The mount, or null if this item does not represent an item with data. If the IMount returned also implements IWritableMount, it will mounted using mountWritable()
* @see dan200.computercraft.api.filesystem.IMount
* @see dan200.computercraft.api.filesystem.IWritableMount
* @see dan200.computercraft.api.ComputerCraftAPI#createSaveDirMount(World, String, long)
* @see dan200.computercraft.api.ComputerCraftAPI#createResourceMount(Class, String, String)
*/
  public IMount createDataMount( ItemStack stack, World world );