public class DummyFileSystem extends DeprecatedVirtualFileSystem implements NonPhysicalFileSystem
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROTOCOL |
| Constructor and Description |
|---|
DummyFileSystem() |
| Modifier and Type | Method and Description |
|---|---|
VirtualFile |
createChildDirectory(java.lang.Object requestor,
VirtualFile vDir,
java.lang.String dirName)
Implementation of adding directories in this file system
|
VirtualFile |
createChildFile(java.lang.Object requestor,
VirtualFile vDir,
java.lang.String fileName)
Implementation of adding files in this file system
|
VirtualFile |
createRoot(java.lang.String name) |
void |
deleteFile(java.lang.Object requestor,
VirtualFile vFile)
Implementation of deleting files in this file system
|
java.lang.String |
extractPresentableUrl(java.lang.String path)
Fetches presentable URL of file with the given path in this file system.
|
VirtualFile |
findFileByPath(java.lang.String path)
Searches for the file specified by given path.
|
void |
fireBeforeContentsChange(java.lang.Object requestor,
VirtualFile file) |
void |
fireContentsChanged(java.lang.Object requestor,
VirtualFile file,
long oldModificationStamp) |
static DummyFileSystem |
getInstance() |
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. |
void |
renameFile(java.lang.Object requestor,
VirtualFile vFile,
java.lang.String newName)
Implementation of renaming files in this file system
|
addVirtualFileListener, assertWriteAccessAllowed, copyFile, fireBeforeFileDeletion, fireBeforeFileMovement, fireBeforePropertyChange, fireFileCopied, fireFileCreated, fireFileDeleted, fireFileMoved, firePropertyChanged, isReadOnly, moveFile, removeVirtualFileListener, startEventPropagationisCaseSensitive, isValidNamepublic static final java.lang.String PROTOCOL
public static DummyFileSystem getInstance()
public VirtualFile createRoot(java.lang.String name)
public java.lang.String getProtocol()
VirtualFileSystemKeyedLazyInstanceEP.key.getProtocol in class VirtualFileSystemVirtualFile.getUrl(),
VirtualFileManager.getFileSystem(java.lang.String)public VirtualFile findFileByPath(java.lang.String path)
VirtualFileSystemVirtualFileSystem. 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 VirtualFileSystempath - the path to find file bynull otherwisepublic java.lang.String extractPresentableUrl(java.lang.String path)
VirtualFileSystemextractPresentableUrl in class VirtualFileSystempath - the path to get presentable URL forVirtualFile.getPresentableUrl()public void refresh(boolean asynchronous)
VirtualFileSystemIf
asynchronous is false this method should be only called within write-action.
See Application.runWriteAction(java.lang.Runnable).refresh in class VirtualFileSystemasynchronous - 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)
VirtualFileSystemVirtualFile
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 VirtualFileSystempath - the pathVirtualFile if the file was found, null otherwisepublic void deleteFile(java.lang.Object requestor,
VirtualFile vFile)
throws java.io.IOException
VirtualFileSystemdeleteFile in class DeprecatedVirtualFileSystemjava.io.IOExceptionVirtualFile.delete(Object)public void renameFile(java.lang.Object requestor,
VirtualFile vFile,
java.lang.String newName)
VirtualFileSystemrenameFile in class DeprecatedVirtualFileSystemVirtualFile.rename(Object,String)public VirtualFile createChildFile(java.lang.Object requestor, VirtualFile vDir, java.lang.String fileName) throws java.io.IOException
VirtualFileSystemcreateChildFile in class DeprecatedVirtualFileSystemjava.io.IOExceptionVirtualFile.createChildData(Object,String)public void fireBeforeContentsChange(java.lang.Object requestor,
VirtualFile file)
fireBeforeContentsChange in class DeprecatedVirtualFileSystempublic void fireContentsChanged(java.lang.Object requestor,
VirtualFile file,
long oldModificationStamp)
fireContentsChanged in class DeprecatedVirtualFileSystempublic VirtualFile createChildDirectory(java.lang.Object requestor, VirtualFile vDir, java.lang.String dirName)
VirtualFileSystemcreateChildDirectory in class DeprecatedVirtualFileSystemVirtualFile.createChildDirectory(Object,String)