java.lang.Object
org.gjt.sp.jedit.io.VFS
org.gjt.sp.jedit.io.FavoritesVFS
A VFS used for remembering frequently-visited directories. Listing it
returns the favorites list. The deletePath of each entry is the
directory prefixed with "favorites:" so that right-clicking on a
favorite and clicking 'delete' in the browser just deletes the
favorite, and not the directory itself.
- Version:
- $Id: FavoritesVFS.java 25331 2020-05-09 14:24:20Z kpouer $
- Author:
- Slava Pestov
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gjt.sp.jedit.io.VFS
VFS.DirectoryEntryCompare
-
Field Summary
Fields inherited from class org.gjt.sp.jedit.io.VFS
BROWSE_CAP, CASE_INSENSITIVE_CAP, DELETE_CAP, EA_MODIFIED, EA_SIZE, EA_STATUS, EA_TYPE, IOBUFSIZE, LOW_LATENCY_CAP, MKDIR_CAP, NON_AWT_SESSION_CAP, READ_CAP, RENAME_CAP, WRITE_CAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Deletes the specified URL.Returns the specified directory entry.VFSFile[]
_listFiles
(Object session, String url, Component comp) Lists the specified directory.boolean
Rename a favoritestatic void
addToFavorites
(String path, int type) static VFSFile[]
getParentOfPath
(String path) Returns the parent of the specified path.static void
static void
Methods inherited from class org.gjt.sp.jedit.io.VFS
_backup, _canonPath, _createInputStream, _createOutputStream, _endVFSSession, _finishTwoStageSave, _listDirectory, _listDirectory, _listDirectory, _mkdir, _saveComplete, constructPath, copy, copy, copy, copy, createVFSSession, createVFSSessionSafe, getCapabilities, getDefaultColorFor, getDefaultEncoding, getExtendedAttributes, getFileName, getFilePath, getFileSeparator, getName, getTwoStageSaveName, insert, isMarkersFileSupported, load, reloadDirectory, save, setEncoding
-
Field Details
-
PROTOCOL
- See Also:
-
-
Constructor Details
-
FavoritesVFS
public FavoritesVFS()
-
-
Method Details
-
getParentOfPath
Description copied from class:VFS
Returns the parent of the specified path. This must be overridden to return a non-null value for browsing of this filesystem to work.- Overrides:
getParentOfPath
in classVFS
- Parameters:
path
- The path
-
_listFiles
Description copied from class:VFS
Lists the specified directory.- Overrides:
_listFiles
in classVFS
- Parameters:
session
- The sessionurl
- The directory. Note that this must be a full URL, including the host name, path name, and so on. The username and password (if needed by the VFS) is obtained from the session instance.comp
- The component that will parent error dialog boxes
-
_getFile
Description copied from class:VFS
Returns the specified directory entry.- Overrides:
_getFile
in classVFS
- Parameters:
session
- The session get it withVFS.createVFSSession(String, Component)
path
- The pathcomp
- The component that will parent error dialog boxes- Returns:
- The specified directory entry, or null if it doesn't exist.
-
_delete
Description copied from class:VFS
Deletes the specified URL. -
_rename
Rename a favorite -
loadFavorites
public static void loadFavorites() -
addToFavorites
-
saveFavorites
public static void saveFavorites() -
getFavorites
-