public class Automounter extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
addHandle(VirtualFile owner,
Closeable handle)
Add handle to owner, to be auto closed.
|
static void |
cleanup(MountOwner owner)
Cleanup all references from the
MountOwner . |
static void |
cleanup(Object owner)
Cleanup all references from the owner.
|
static void |
cleanup(VirtualFile owner)
Cleanup all references from the owner.
|
static boolean |
isMounted(VirtualFile target)
Determines whether a target
VirtualFile is mounted. |
static void |
mount(MountOwner owner,
VirtualFile target,
MountOption... mountOptions)
Mount provided
VirtualFile (if not mounted) and add an owner entry. |
static void |
mount(Object owner,
VirtualFile target,
MountOption... mountOptions)
Mount provided
VirtualFile (if not mounted) and add an owner entry. |
static void |
mount(VirtualFile target,
MountOption... mountOptions)
Mount provided
VirtualFile (if not mounted) and set the owner to be the provided target. |
static void |
mount(VirtualFile owner,
VirtualFile target,
MountOption... mountOptions)
Mount provided
VirtualFile (if not mounted) and add an owner entry. |
static boolean |
removeHandle(VirtualFile owner,
Closeable handle)
Remove handle from owner.
|
public static void mount(VirtualFile target, MountOption... mountOptions) throws IOException
VirtualFile
(if not mounted) and set the owner to be the provided target. (Self owned mount)target
- VirtualFile to mountmountOptions
- optional configuration to use for mountingIOException
- when the target can not be mounted.public static void mount(Object owner, VirtualFile target, MountOption... mountOptions) throws IOException
VirtualFile
(if not mounted) and add an owner entry. Also creates a back-reference to from the owner to the target.owner
- Object that owns the reference to the mounttarget
- VirtualFile to mountmountOptions
- optional configuration to use for mountingIOException
- when the target can not be mounted.public static void mount(VirtualFile owner, VirtualFile target, MountOption... mountOptions) throws IOException
VirtualFile
(if not mounted) and add an owner entry. Also creates a back-reference to from the owner to the target.owner
- VirtualFile that owns the reference to the mounttarget
- VirtualFile to mountmountOptions
- optional configuration to use for mountingIOException
- when the target can not be mounted.public static void mount(MountOwner owner, VirtualFile target, MountOption... mountOptions) throws IOException
VirtualFile
(if not mounted) and add an owner entry. Also creates a back-reference to from the owner to the target.owner
- MountOwner that owns the reference to the mounttarget
- VirtualFile to mountmountOptions
- optional configuration to use for mountingIOException
- when the target can not be mountedpublic static boolean addHandle(VirtualFile owner, Closeable handle)
owner
- the handle ownerhandle
- the handlepublic static boolean removeHandle(VirtualFile owner, Closeable handle)
owner
- the handle ownerhandle
- the handlepublic static void cleanup(Object owner)
owner
- Object
to cleanup references forpublic static void cleanup(VirtualFile owner)
owner
- Object
to cleanup references forpublic static void cleanup(MountOwner owner)
MountOwner
. Cleanup any mounted entries that become un-referenced in the process.owner
- MountOwner
to cleanup references forpublic static boolean isMounted(VirtualFile target)
VirtualFile
is mounted.target
- target to checkCopyright © 2012 JBoss by Red Hat. All Rights Reserved.