1. Etienne Perot
  2. fuse-jna

Commits

Etienne Perot  committed 27ea03d

Progress on mounting process, added a bunch of extra checks

  • Participants
  • Parent commits eb49fbb
  • Branches master

Comments (0)

Files changed (6)

File src/net/fusejna/FuseFilesystem.java

View file
  • Ignore whitespace
 package net.fusejna;
 
 import java.io.File;
+import java.io.IOException;
+import java.util.concurrent.locks.ReentrantLock;
 import java.util.regex.Pattern;
 
 public abstract class FuseFilesystem
 {
-	private static final String defaultFilesystemName = "userfs";
+	private static final String defaultFilesystemName = "userfs-";
 	private static final Pattern regexNormalizeFilesystemName = Pattern.compile("[a-zA-Z]");
+	private final ReentrantLock mountLock = new ReentrantLock();
+	private File mountPoint = null;
+
+	protected abstract void afterUnmount(final File mountPoint);
+
+	protected abstract void beforeUnmount(final File mountPoint);
 
 	final String getFuseName()
 	{
 		return name.toLowerCase();
 	}
 
+	public final File getMountPoint()
+	{
+		mountLock.lock();
+		final File mountPoint = this.mountPoint;
+		mountLock.unlock();
+		return mountPoint;
+	}
+
 	protected abstract String getName();
 
 	protected abstract String[] getOptions();
 
-	public final void mount(final File mountPoint) throws InvalidMountpointException, UnsatisfiedLinkError, FuseException
+	public final boolean isMounted()
+	{
+		return getMountPoint() != null;
+	}
+
+	public final void mount(final File mountPoint) throws FuseException
 	{
-		FuseJna.mount(this, mountPoint);
+		mount(mountPoint, true);
 	}
 
-	public final void mount(final String mountPoint) throws InvalidMountpointException, UnsatisfiedLinkError, FuseException
+	public final void mount(final File mountPoint, final boolean blocking) throws UnsatisfiedLinkError, FuseException
 	{
-		mount(new File(mountPoint));
+		mountLock.lock();
+		if (isMounted()) {
+			throw new IllegalStateException(getFuseName() + " is already mounted at " + this.mountPoint);
+		}
+		try {
+			FuseJna.mount(this, mountPoint, blocking);
+			this.mountPoint = mountPoint;
+			onMount(mountPoint);
+		}
+		finally {
+			mountLock.unlock();
+		}
+	}
+
+	public final void mount(final String mountPoint) throws FuseException
+	{
+		mount(new File(mountPoint), true);
+	}
+
+	protected abstract void onMount(final File mountPoint);
+
+	final void setFinalMountPoint(final File mountPoint)
+	{
+		mountLock.lock();
+		this.mountPoint = mountPoint;
+		mountLock.unlock();
+	}
+
+	public final void unmount() throws IOException, FuseException
+	{
+		mountLock.lock();
+		try {
+			beforeUnmount(mountPoint);
+			FuseJna.unmount(this);
+			final File oldMountPoint = mountPoint;
+			mountPoint = null;
+			beforeUnmount(oldMountPoint);
+		}
+		finally {
+			mountLock.unlock();
+		}
 	}
 }

File src/net/fusejna/FuseJna.java

View file
  • Ignore whitespace
 package net.fusejna;
 
 import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
-import net.fusejna.examples.NullFS;
 import net.fusejna.structures.StructFuseContext;
 import net.fusejna.structures.StructFuseOperations;
 import net.fusejna.types.TypeSize;
 {
 	private interface LibFuse extends Library
 	{
-		StructFuseContext fuse_get_context();
+		StructFuseContext.ByReference fuse_get_context();
 
 		int fuse_main_real(int argc, String[] argv, StructFuseOperations op, TypeSize size, Pointer user_data);
 	}
 
+	private static final class MountThread extends Thread
+	{
+		private Integer result = null;
+		private final String[] args;
+		private final StructFuseOperations operations;
+		private final LibFuse fuse;
+		private final File mountPoint;
+
+		private MountThread(final String filesystemName, final LibFuse fuse, final String[] args, final File mountPoint,
+				final StructFuseOperations operations)
+		{
+			super(filesystemName + "-fuse");
+			this.fuse = fuse;
+			this.args = args;
+			this.mountPoint = mountPoint;
+			this.operations = operations;
+			start();
+		}
+
+		private final Integer getResult()
+		{
+			return result;
+		}
+
+		@Override
+		public final void run()
+		{
+			result = fuse.fuse_main_real(args.length, args, operations, new TypeSize(operations), null);
+			unregisterFilesystemName(mountPoint);
+		}
+	}
+
 	private static LibFuse libFuse = null;
 	private static Lock libFuseLoadLock = new ReentrantLock();
+	private static Lock filesystemNameLock = new ReentrantLock();
+	private static final Random defaultFilesystemRandom = new Random();
+	private static final Map<File, String> filesystemNames = new HashMap<File, String>();
+	private static final long errorSleepDuration = 750;
+	private static String fusermount = "fusermount";
 
-	static LibFuse getFuse() throws UnsatisfiedLinkError
+	private static final String getFilesystemName(final File mountPoint, final String fuseName)
+	{
+		filesystemNameLock.lock();
+		if (filesystemNames.put(mountPoint, fuseName) == null) {
+			filesystemNameLock.unlock();
+			return fuseName;
+		}
+		String suffix;
+		do {
+			suffix = Long.toString(defaultFilesystemRandom.nextLong());
+		}
+		while (filesystemNames.put(mountPoint, fuseName + suffix) != null);
+		filesystemNameLock.unlock();
+		return fuseName + suffix;
+	}
+
+	static final LibFuse getFuse() throws UnsatisfiedLinkError
 	{
 		if (libFuse != null) {
 			// No need to lock if everything is fine already
 		return libFuse;
 	}
 
-	public static void main(final String... args)
+	static final void mount(final FuseFilesystem filesystem, File mountPoint, final boolean blocking) throws FuseException
 	{
-		final LibFuse fuse = getFuse();
-		final String[] argv = { "userfs", "-f", args[0] };
-		final StructFuseOperations.ByReference operations = new StructFuseOperations.ByReference(new NullFS());
-		fuse.fuse_main_real(argv.length, argv, operations, new TypeSize(operations.size()), null);
-		System.err.println("Mounted");
-	}
-
-	static void mount(final FuseFilesystem filesystem, final File mountpoint) throws InvalidMountpointException, FuseException,
-			UnsatisfiedLinkError
-	{
-		if (!mountpoint.isDirectory()) {
-			throw new NotADirectoryMountpointException(mountpoint);
+		mountPoint = mountPoint.getAbsoluteFile();
+		try {
+			mountPoint = mountPoint.getCanonicalFile();
+		}
+		catch (final IOException e) {
+			throw new NotADirectoryMountpointException(mountPoint);
 		}
-		if (!mountpoint.canRead() || !mountpoint.canWrite() || !mountpoint.canExecute()) {
+		if (!mountPoint.isDirectory()) {
+			throw new NotADirectoryMountpointException(mountPoint);
+		}
+		if (!mountPoint.canRead() || !mountPoint.canWrite() || !mountPoint.canExecute()) {
 			boolean successful = true;
 			try {
-				successful = mountpoint.setReadable(true) && successful;
-				successful = mountpoint.setWritable(true) && successful;
-				successful = mountpoint.setExecutable(true) && successful;
+				successful = mountPoint.setReadable(true) && successful;
+				successful = mountPoint.setWritable(true) && successful;
+				successful = mountPoint.setExecutable(true) && successful;
 			}
 			catch (final Exception e) {
-				throw new InvalidPermissionsMountpointException(mountpoint);
+				throw new InvalidPermissionsMountpointException(mountPoint);
 			}
 			if (!successful) {
-				throw new InvalidPermissionsMountpointException(mountpoint);
+				throw new InvalidPermissionsMountpointException(mountPoint);
 			}
 		}
+		filesystem.setFinalMountPoint(mountPoint);
+		final String filesystemName = getFilesystemName(mountPoint, filesystem.getFuseName());
 		final String[] options = filesystem.getOptions();
 		final String[] argv;
 		if (options == null) {
 				argv[i + 2] = options[i];
 			}
 		}
-		argv[0] = filesystem.getFuseName();
+		argv[0] = filesystemName;
 		argv[1] = "-f";
-		argv[argv.length - 1] = mountpoint.getAbsolutePath();
+		argv[argv.length - 1] = mountPoint.getAbsolutePath();
 		final LibFuse fuse = getFuse();
 		final StructFuseOperations operations = new StructFuseOperations(filesystem);
-		final int result = fuse.fuse_main_real(argv.length, argv, operations, new TypeSize(operations), null);
-		if (result != 0) {
+		final Integer result;
+		if (blocking) {
+			result = fuse.fuse_main_real(argv.length, argv, operations, new TypeSize(operations), null);
+			unregisterFilesystemName(mountPoint);
+		}
+		else {
+			final MountThread mountThread = new MountThread(filesystemName, fuse, argv, mountPoint, operations);
+			try {
+				Thread.sleep(errorSleepDuration);
+			}
+			catch (final InterruptedException e) {
+				// Carry on
+			}
+			result = mountThread.getResult();
+		}
+		if (result != null && result != 0) {
 			throw new FuseException(result);
 		}
 	}
+
+	public static final void setFusermount(final String fusermount)
+	{
+		FuseJna.fusermount = fusermount;
+	}
+
+	static void unmount(final FuseFilesystem fuseFilesystem) throws IOException, FuseException
+	{
+		final File mountPoint = fuseFilesystem.getMountPoint();
+		try {
+			final Process fusermount = new ProcessBuilder(FuseJna.fusermount, "-l", "-u", mountPoint.toString()).start();
+			final int result = fusermount.waitFor();
+			if (result != 0) {
+				throw new FuseException(result);
+			}
+		}
+		catch (final InterruptedException e) {
+			// Ignore
+		}
+		unregisterFilesystemName(fuseFilesystem.getMountPoint());
+	}
+
+	private static final void unregisterFilesystemName(final File mountPoint)
+	{
+		filesystemNameLock.lock();
+		filesystemNames.remove(mountPoint);
+		filesystemNameLock.unlock();
+	}
 }

File src/net/fusejna/InvalidMountpointException.java

View file
  • Ignore whitespace
 
 import java.io.File;
 
-public abstract class InvalidMountpointException extends Exception
+public abstract class InvalidMountpointException extends IllegalArgumentException
 {
 	private static final long serialVersionUID = -4067651016257829200L;
 	private final File mountpoint;

File src/net/fusejna/examples/NullFS.java

View file
  • Ignore whitespace
 
 import java.io.File;
 
-import net.fusejna.FuseFilesystem;
+import net.fusejna.util.FuseFilesystemAdapterFull;
 
-public final class NullFS extends FuseFilesystem
+public final class NullFS extends FuseFilesystemAdapterFull
 {
 	public static void main(final String... args)
 	{
 	{
 		return "NullFS";
 	}
-
-	@Override
-	protected String[] getOptions()
-	{
-		return null;
-	}
 }

File src/net/fusejna/structures/StructFuseOperations.java

View file
  • Ignore whitespace
 		}
 	}
 
-	public Callback getattr = null;
-	public Callback readlink = null;
-	public Callback mknod = null;
-	public Callback mkdir = null;
-	public Callback unlink = null;
-	public Callback rmdir = null;
-	public Callback symlink = null;
-	public Callback rename = null;
-	public Callback link = null;
-	public Callback chmod = null;
-	public Callback chown = null;
-	public Callback truncate = null;
-	public Callback utime = null;
-	public Callback open = null;
-	public Callback read = null;
-	public Callback write = null;
-	public Callback statfs = null;
-	public Callback flush = null;
-	public Callback release = null;
-	public Callback fsync = null;
-	public Callback setxattr = null;
-	public Callback getxattr = null;
-	public Callback listxattr = null;
-	public Callback removexattr = null;
-	public Callback opendir = null;
-	public Callback readdir = null;
-	public Callback releasedir = null;
-	public Callback fsyncdir = null;
-	public Callback init = null;
-	public Callback destroy = null;
-	public Callback access = null;
-	public Callback create = null;
-	public Callback ftruncate = null;
-	public Callback fgetattr = null;
-	public Callback lock = null;
-	public Callback utimens = null;
-	public Callback bmap = null;
-	public int flag_nullpath_ok = 0;
-	public int flag_reserved = 31;
-	public Callback ioctl = null;
-	public Callback poll = null;
+	public Callback getattr;
+	public Callback readlink;
+	public Pointer getdir = null;
+	public Callback mknod;
+	public Callback mkdir;
+	public Callback unlink;
+	public Callback rmdir;
+	public Callback symlink;
+	public Callback rename;
+	public Callback link;
+	public Callback chmod;
+	public Callback chown;
+	public Callback truncate;
+	public Pointer utime = null;
+	public Callback open;
+	public Callback read;
+	public Callback write;
+	public Callback statfs;
+	public Callback flush;
+	public Callback release;
+	public Callback fsync;
+	public Callback setxattr;
+	public Callback getxattr;
+	public Callback listxattr;
+	public Callback removexattr;
+	public Callback opendir;
+	public Callback readdir;
+	public Callback releasedir;
+	public Callback fsyncdir;
+	public Callback init;
+	public Callback destroy;
+	public Callback access;
+	public Callback create;
+	public Callback ftruncate;
+	public Callback fgetattr;
+	public Callback lock;
+	public Callback utimens;
+	public Callback bmap;
 
 	@SuppressWarnings("unused")
 	public StructFuseOperations(final FuseFilesystem filesystem)
 	{
 		getattr = new Callback()
 		{
-			public int callback(final String path, final StructStat.ByReference stat)
+			public final int callback(final String path, final StructStat.ByReference stat)
 			{
 				System.out.println("getattr " + stat);
-				sleep();
 				return 0;
 			}
 		};
 		readlink = new Callback()
 		{
-			public int callback(final String path, final String target, final TypeSize size)
+			public final int callback(final String path, final String target, final TypeSize size)
 			{
 				System.out.println("readlink");
-				sleep();
 				return 0;
 			}
 		};
 		mknod = new Callback()
 		{
-			public int callback(final String path, final TypeMode mode, final TypeDev dev)
+			public final int callback(final String path, final TypeMode mode, final TypeDev dev)
 			{
 				System.out.println("mknod");
-				sleep();
 				return 0;
 			}
 		};
 		mkdir = new Callback()
 		{
-			public int callback(final String path, final TypeMode mode)
+			public final int callback(final String path, final TypeMode mode)
 			{
 				System.out.println("mkdir");
-				sleep();
 				return 0;
 			}
 		};
 		unlink = new Callback()
 		{
-			public int callback(final String path)
+			public final int callback(final String path)
 			{
 				System.out.println("unlink");
-				sleep();
 				return 0;
 			}
 		};
 		rmdir = new Callback()
 		{
-			public int callback(final String path)
+			public final int callback(final String path)
 			{
 				System.out.println("rmdir");
-				sleep();
 				return 0;
 			}
 		};
 		symlink = new Callback()
 		{
-			public int callback(final String path, final String target)
+			public final int callback(final String path, final String target)
 			{
 				System.out.println("symlink");
-				sleep();
 				return 0;
 			}
 		};
 		rename = new Callback()
 		{
-			public int callback(final String path, final String newName)
+			public final int callback(final String path, final String newName)
 			{
 				System.out.println("rename");
-				sleep();
 				return 0;
 			}
 		};
 		link = new Callback()
 		{
-			public int callback(final String path, final String target)
+			public final int callback(final String path, final String target)
 			{
 				System.out.println("link");
-				sleep();
 				return 0;
 			}
 		};
 		chmod = new Callback()
 		{
-			public int callback(final String path, final TypeMode mode)
+			public final int callback(final String path, final TypeMode mode)
 			{
 				System.out.println("chmod");
-				sleep();
 				return 0;
 			}
 		};
 		chown = new Callback()
 		{
-			public int callback(final String path, final TypeUid uid, final TypeGid gid)
+			public final int callback(final String path, final TypeUid uid, final TypeGid gid)
 			{
 				System.out.println("chown");
-				sleep();
 				return 0;
 			}
 		};
 		truncate = new Callback()
 		{
-			public int callback(final String path, final TypeOff offset)
+			public final int callback(final String path, final TypeOff offset)
 			{
 				System.out.println("truncate");
-				sleep();
 				return 0;
 			}
 		};
-		utime = null; // Deprecated
 		open = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("open");
-				sleep();
 				return 0;
 			}
 		};
 		read = new Callback()
 		{
-			public int callback(final String path, final Pointer buffer, final TypeSize size, final TypeOff offset,
+			public final int callback(final String path, final Pointer buffer, final TypeSize size, final TypeOff offset,
 					final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("read");
-				sleep();
 				return 0;
 			}
 		};
 		write = new Callback()
 		{
-			public int callback(final String path, final String buffer, final TypeSize size, final TypeOff offset,
+			public final int callback(final String path, final String buffer, final TypeSize size, final TypeOff offset,
 					final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("write");
-				sleep();
 				return 0;
 			}
 		};
 		statfs = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference statsvfs)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference statsvfs)
 			{
 				System.out.println("statfs");
-				sleep();
 				return 0;
 			}
 		};
 		flush = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("flush");
-				sleep();
 				return 0;
 			}
 		};
 		release = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("info");
-				sleep();
 				return 0;
 			}
 		};
 		fsync = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("fsync");
-				sleep();
 				return 0;
 			}
 		};
 		setxattr = new Callback()
 		{
-			public int callback(final String path, final String xattr, final String value, final TypeSize size, final int flags)
+			public final int callback(final String path, final String xattr, final String value, final TypeSize size,
+					final int flags)
 			{ // xattr stuff has extra stuff on OS X
 				System.out.println("setxattr");
-				sleep();
 				return 0;
 			}
 		};
 		getxattr = new Callback()
 		{
-			public int callback(final String path, final String xattr, final Pointer target, final TypeSize size)
+			public final int callback(final String path, final String xattr, final Pointer target, final TypeSize size)
 			{
 				System.out.println("getxattr");
-				sleep();
 				return 0;
 			}
 		};
 		listxattr = new Callback()
 		{
-			public int callback(final String path, final Pointer target, final TypeSize size)
+			public final int callback(final String path, final Pointer target, final TypeSize size)
 			{
 				System.out.println("listxattr");
-				sleep();
 				return 0;
 			}
 		};
 		removexattr = new Callback()
 		{
-			public int callback(final String path, final String xattr)
+			public final int callback(final String path, final String xattr)
 			{
 				System.out.println("removexattr");
-				sleep();
 				return 0;
 			}
 		};
 		opendir = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("opendir");
-				sleep();
 				return 0;
 			}
 		};
 		readdir = new Callback()
 		{
-			public int callback(final String path, final Callback fillFunction, final TypeOff offset,
+			public final int callback(final String path, final Callback fillFunction, final TypeOff offset,
 					final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("readdir");
-				sleep();
 				return 0;
 			}
 		};
 		releasedir = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("releasedir");
-				sleep();
 				return 0;
 			}
 		};
 		fsyncdir = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("fsyncdir");
-				sleep();
 				return 0;
 			}
 		};
 		init = new Callback()
 		{
-			public Pointer callback(final StructFuseConnInfo.ByReference conn)
+			public final Pointer callback(final StructFuseConnInfo.ByReference conn)
 			{
 				System.out.println("init");
-				sleep();
 				return null;
 			}
 		};
 		destroy = new Callback()
 		{
-			public void callback(final Pointer user_data)
+			public final void callback(final Pointer user_data)
 			{
 				System.out.println("destroy");
-				sleep();
 			}
 		};
 		access = new Callback()
 		{
-			public int callback(final String path, final int access)
+			public final int callback(final String path, final int access)
 			{
 				System.out.println("access");
-				sleep();
 				return 0;
 			}
 		};
 		create = new Callback()
 		{
-			public int callback(final String path, final TypeMode mode, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final TypeMode mode, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("create");
-				sleep();
 				return 0;
 			}
 		};
 		ftruncate = new Callback()
 		{
-			public int callback(final String path, final TypeOff offset, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final TypeOff offset, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("ftruncate");
-				sleep();
 				return 0;
 			}
 		};
 		fgetattr = new Callback()
 		{
-			public int callback(final String path, final Pointer attr, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final Pointer attr, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("fgetattr");
-				sleep();
 				return 0;
 			}
 		};
 		lock = new Callback()
 		{
-			public int callback(final String path, final Pointer info, final int cmd, final Pointer flock)
+			public final int callback(final String path, final Pointer info, final int cmd, final Pointer flock)
 			{
 				System.out.println("lock");
-				sleep();
 				return 0;
 			}
 		};
 		utimens = new Callback()
 		{
-			public int callback(final String path, final Pointer timespec)
+			public final int callback(final String path, final Pointer timespec)
 			{ // Has two timespecs
 				System.out.println("utimens");
-				sleep();
 				return 0;
 			}
 		};
 		bmap = new Callback()
 		{
-			public int callback(final String path, final StructFuseFileInfo.ByReference info)
+			public final int callback(final String path, final StructFuseFileInfo.ByReference info)
 			{
 				System.out.println("bmap");
-				sleep();
 				return 0;
 			}
 		};
-		ioctl = new Callback()
-		{
-			public int callback(final String path, final TypeSize blockSize, final Pointer idx)
-			{
-				System.out.println("ioctl");
-				sleep();
-				return 0;
-			}
-		};
-		poll = new Callback()
-		{
-			public int callback(final String path, final TypeSize blockSize, final Pointer fuse_pollhandle,
-					final Pointer reventsp)
-			{
-				System.out.println("poll");
-				sleep();
-				return 0;
-			}
-		};
-	}
-
-	private void sleep()
-	{
-		try {
-			Thread.sleep(5000);
-		}
-		catch (final InterruptedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
 	}
 }

File src/net/fusejna/util/FuseFilesystemAdapterFull.java

View file
  • Ignore whitespace
+package net.fusejna.util;
+
+import java.io.File;
+
+import net.fusejna.FuseFilesystem;
+
+public abstract class FuseFilesystemAdapterFull extends FuseFilesystem
+{
+	@Override
+	protected void afterUnmount(final File mountPoint)
+	{
+	}
+
+	@Override
+	protected void beforeUnmount(final File mountPoint)
+	{
+	}
+
+	@Override
+	protected String getName()
+	{
+		return null;
+	}
+
+	@Override
+	protected String[] getOptions()
+	{
+		return null;
+	}
+
+	@Override
+	protected void onMount(final File mountPoint)
+	{
+	}
+}