public abstract class DummyCachingFileSystem<T extends VirtualFile> extends DummyFileSystem
PROTOCOL
Constructor and Description |
---|
DummyCachingFileSystem(java.lang.String protocol) |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeFileRename(VirtualFile file,
java.lang.Object requestor,
java.lang.String oldName,
java.lang.String newName) |
protected void |
clearCache() |
VirtualFile |
createRoot(java.lang.String name) |
protected void |
doRenameFile(VirtualFile vFile,
java.lang.String newName) |
protected static java.lang.String |
escapeSlash(java.lang.String name) |
java.lang.String |
extractPresentableUrl(java.lang.String path)
Fetches presentable URL of file with the given path in this file system.
|
protected void |
fileRenamed(VirtualFile file,
java.lang.Object requestor,
java.lang.String oldName,
java.lang.String newName) |
T |
findFileByPath(java.lang.String path)
Searches for the file specified by given path.
|
protected abstract T |
findFileByPathInner(java.lang.String path) |
java.util.Collection<T> |
getCachedFiles() |
protected java.lang.String |
getPresentableUrl(VirtualFile file) |
Project |
getProject(java.lang.String projectId) |
java.lang.String |
getProtocol()
Gets the protocol for this file system.
|
void |
onProjectClosed() |
void |
onProjectOpened(Project project) |
void |
renameFile(java.lang.Object requestor,
VirtualFile vFile,
java.lang.String newName)
Implementation of renaming files in this file system
|
protected void |
retainFiles(Condition<? super VirtualFile> c) |
protected static java.lang.String |
unescapeSlash(java.lang.String name) |
createChildDirectory, createChildFile, deleteFile, fireBeforeContentsChange, fireContentsChanged, getInstance, refresh, refreshAndFindFileByPath
addVirtualFileListener, assertWriteAccessAllowed, copyFile, fireBeforeFileDeletion, fireBeforeFileMovement, fireBeforePropertyChange, fireFileCopied, fireFileCreated, fireFileDeleted, fireFileMoved, firePropertyChanged, isReadOnly, moveFile, removeVirtualFileListener, startEventPropagation
isCaseSensitive, isValidName
public final java.lang.String getProtocol()
VirtualFileSystem
KeyedLazyInstanceEP.key
.getProtocol
in class DummyFileSystem
VirtualFile.getUrl()
,
VirtualFileManager.getFileSystem(java.lang.String)
public final VirtualFile createRoot(java.lang.String name)
createRoot
in class DummyFileSystem
public final T 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 DummyFileSystem
path
- the path to find file bynull
otherwisepublic java.lang.String extractPresentableUrl(java.lang.String path)
VirtualFileSystem
extractPresentableUrl
in class DummyFileSystem
path
- the path to get presentable URL forVirtualFile.getPresentableUrl()
protected java.lang.String getPresentableUrl(VirtualFile file)
protected abstract T findFileByPathInner(java.lang.String path)
protected void doRenameFile(VirtualFile vFile, java.lang.String newName)
public Project getProject(java.lang.String projectId)
public java.util.Collection<T> getCachedFiles()
public void onProjectClosed()
public void onProjectOpened(Project project)
protected void clearCache()
protected void retainFiles(Condition<? super VirtualFile> c)
public void renameFile(java.lang.Object requestor, VirtualFile vFile, java.lang.String newName)
VirtualFileSystem
renameFile
in class DummyFileSystem
VirtualFile.rename(Object,String)
protected void beforeFileRename(VirtualFile file, java.lang.Object requestor, java.lang.String oldName, java.lang.String newName)
protected void fileRenamed(VirtualFile file, java.lang.Object requestor, java.lang.String oldName, java.lang.String newName)
protected static java.lang.String escapeSlash(java.lang.String name)
protected static java.lang.String unescapeSlash(java.lang.String name)