站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

MountSupport (Master Filesystem) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.masterfs/1 1.11

org.netbeans.modules.masterfs.providers
Class MountSupport

java.lang.Object
  extended by org.netbeans.modules.masterfs.providers.MountSupport

public final class MountSupport
extends Object

Enables to mount and unmount filesystems. The only way, how to get instance of MountSupport is to implement org.netbeans.modules.masterfs.providers.FileSystemProvider#initialize and keep passed instance of MountSupport. So, there is important to know, that only filesystems, that have registered implementation of FileSystemProvider can be mounted. There is obvious, that only already mounted filesystems can be unmounted.

See Also:
FileSystemProvider.initialize(org.netbeans.modules.masterfs.providers.MountSupport)

Method Summary
 void mount(String mountPoint, FileSystem fs)
          Mounts a file system on mount point defined by parameter mountPoint.
 void unmount(FileSystem fs)
          Unmounts already mounted filesystem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

mount

public void mount(String mountPoint,
                  FileSystem fs)
           throws IOException
Mounts a file system on mount point defined by parameter mountPoint. Once mounted filesystem must be first unmounted, before other filesystem can be mounted on the same mountPoint.

Parameters:
mountPoint - corresponds to java.io.File.getAbstractPath. But be aware, that this doesn't mean, that such file must really exist. MountPoint may also address virtual location.
fs - filesystem that should be mounted. FileObject hierarchy within a delegate FileSystem must precisely match the File hierarchy and must not hide any files which exist on disk.
Throws:
IOException - when mount fails e.g.: there already exists mounted filesystem assigned to passed mount point.

unmount

public void unmount(FileSystem fs)
             throws IOException
Unmounts already mounted filesystem.

Parameters:
fs - filesystem, taht should be unmounted
Throws:
IOException - when unmount fails e.g.: passed fs hasn't been mounted yet.

org.netbeans.modules.masterfs/1 1.11

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.