public class CoreJarFileSystem extends DeprecatedVirtualFileSystem
Constructor and Description |
---|
CoreJarFileSystem() |
Modifier and Type | Method and Description |
---|---|
void |
clearHandlersCache() |
VirtualFile |
findFileByPath(java.lang.String path)
Searches for the file specified by given path.
|
java.lang.String |
getProtocol()
Gets the protocol for this file system.
|
void |
refresh(boolean asynchronous)
Refreshes the cached information for all files in this file system from the physical file system.
|
VirtualFile |
refreshAndFindFileByPath(java.lang.String path)
Refreshes only the part of the file system needed for searching the file by the given path and finds file
by the given path.
This method is useful when the file was created externally and you need to find
corresponding to it. |
protected Couple<java.lang.String> |
splitPath(java.lang.String path) |
addVirtualFileListener, assertWriteAccessAllowed, copyFile, createChildDirectory, createChildFile, deleteFile, fireBeforeContentsChange, fireBeforeFileDeletion, fireBeforeFileMovement, fireBeforePropertyChange, fireContentsChanged, fireFileCopied, fireFileCreated, fireFileDeleted, fireFileMoved, firePropertyChanged, isReadOnly, moveFile, removeVirtualFileListener, renameFile, startEventPropagation
extractPresentableUrl, isCaseSensitive, isValidName
public java.lang.String getProtocol()
VirtualFileSystem
KeyedLazyInstanceEP.key
.getProtocol
in class VirtualFileSystem
VirtualFile.getUrl()
,
VirtualFileManager.getFileSystem(java.lang.String)
public VirtualFile findFileByPath(java.lang.String path)
VirtualFileSystem
VirtualFileSystem
. Format of the path depends on the concrete file system.
For LocalFileSystem
it is an absolute path (both Unix- and Windows-style separator chars are allowed).findFileByPath
in class VirtualFileSystem
path
- the path to find file bynull
otherwiseprotected Couple<java.lang.String> splitPath(java.lang.String path)
public void refresh(boolean asynchronous)
VirtualFileSystem
If
asynchronous
is false
this method should be only called within write-action.
See Application.runWriteAction(java.lang.Runnable)
.refresh
in class VirtualFileSystem
asynchronous
- if true
then the operation will be performed in a separate thread,
otherwise will be performed immediatelyVirtualFile.refresh(boolean, boolean)
,
VirtualFileManager.syncRefresh()
,
VirtualFileManager.asyncRefresh(java.lang.Runnable)
public VirtualFile refreshAndFindFileByPath(java.lang.String path)
VirtualFileSystem
VirtualFile
corresponding to it.If this method is invoked not from Swing event dispatch thread, then it must not happen inside a read action. The reason is that then the method call won't return until proper VFS events are fired, which happens on Swing thread and in write action. So invoking this method in a read action would result in a deadlock.
refreshAndFindFileByPath
in class VirtualFileSystem
path
- the pathVirtualFile
if the file was found, null
otherwisepublic void clearHandlersCache()