public class VFSHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
VFSHelper.SessionErrorException |
| Constructor and Description |
|---|
VFSHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
createVFSSession(org.gjt.sp.jedit.io.VFS vfs,
java.lang.String path)
Creates a VFS session.
|
static java.lang.Object |
createVFSSession(org.gjt.sp.jedit.io.VFS vfs,
java.lang.String path,
org.gjt.sp.jedit.View v)
Creates a VFS session.
|
static void |
deleteFile(java.lang.String url)
Deletes a file.
|
static void |
endVFSSession(org.gjt.sp.jedit.io.VFS vfs,
java.lang.Object session,
org.gjt.sp.jedit.View v)
Ends a VFS session, logging any exceptions.
|
static org.gjt.sp.jedit.io.VFSFile |
getFile(java.lang.String url)
Creates a VFSFile instance for the given URL.
|
static org.gjt.sp.jedit.io.VFSFile |
getFileExtExc(java.lang.String url)
Creates a VFSFile instance for the given URL.
|
static boolean |
isLocal(java.lang.String url)
Returns whether the path references a local file.
|
static boolean |
pathExists(java.lang.String path)
Returns whether a VFS path exists.
|
static boolean |
pathExists(java.lang.String path,
java.lang.String[] aCorr)
Returns whether a VFS path exists.
|
public static java.lang.Object createVFSSession(org.gjt.sp.jedit.io.VFS vfs,
java.lang.String path)
vfs - The VFS instance.path - The path for which a session is being created.public static java.lang.Object createVFSSession(org.gjt.sp.jedit.io.VFS vfs,
java.lang.String path,
org.gjt.sp.jedit.View v)
vfs - The VFS instance.path - The path for which a session is being created.v - View for error reporting.public static void endVFSSession(org.gjt.sp.jedit.io.VFS vfs,
java.lang.Object session,
org.gjt.sp.jedit.View v)
vfs - The VFS instance.session - The session to end.v - A jEdit view.public static void deleteFile(java.lang.String url)
throws java.io.IOException
url - The URL for the file to delete.java.io.IOExceptionpublic static org.gjt.sp.jedit.io.VFSFile getFile(java.lang.String url)
throws java.io.IOException
java.io.IOExceptionpublic static org.gjt.sp.jedit.io.VFSFile getFileExtExc(java.lang.String url)
throws java.io.IOException,
VFSHelper.SessionErrorException
java.io.IOExceptionVFSHelper.SessionErrorExceptionpublic static boolean isLocal(java.lang.String url)
url - VFS URL to check.public static boolean pathExists(java.lang.String path)
path - Path to check.public static boolean pathExists(java.lang.String path,
java.lang.String[] aCorr)
This method should not be called from outside ProjectViewer.
path - A path to check.aCorr - An array to return the path in correct case. This is
for case insensitive filesystems, if user supplied a path in
a non-canonical case. May be null.