|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.openapi.vfs.VirtualFileSystem
com.intellij.openapi.vcs.vfs.VcsFileSystem
public class VcsFileSystem
| Constructor Summary | |
|---|---|
VcsFileSystem()
|
|
| Method Summary | |
|---|---|
void |
disposeComponent()
Component should dispose system resources or perform another cleanup in this method. |
VirtualFile |
findFileByPath(java.lang.String path)
Searches for the file specified by given path. |
protected void |
fireBeforeContentsChange(java.lang.Object requestor,
VirtualFile file)
|
protected void |
fireBeforeFileDeletion(java.lang.Object requestor,
VirtualFile file)
|
void |
fireContentsChanged(java.lang.Object requestor,
VirtualFile file,
long oldModificationStamp)
|
protected void |
fireFileDeleted(java.lang.Object requestor,
VirtualFile file,
java.lang.String fileName,
boolean isDirectory,
VirtualFile parent)
|
void |
forceRefreshFile(VirtualFile file)
|
void |
forceRefreshFiles(boolean asynchronous,
VirtualFile... files)
Reloads files from disk regardless of their changed timestamp/contents |
java.lang.String |
getComponentName()
Unique name of this component. |
static VcsFileSystem |
getInstance()
|
java.lang.String |
getProtocol()
Gets the protocol for this file system. |
void |
initComponent()
Component should do initialization and communication with another components in this method. |
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. |
| Methods inherited from class com.intellij.openapi.vfs.VirtualFileSystem |
|---|
addVirtualFileListener, extractPresentableUrl, fireBeforeFileMovement, fireBeforePropertyChange, fireFileCreated, fireFileMoved, firePropertyChanged, removeVirtualFileListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VcsFileSystem()
| Method Detail |
|---|
public static VcsFileSystem getInstance()
public java.lang.String getProtocol()
VirtualFileSystem
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 absoulute file path with file separator characters (File.separatorChar)
replaced to the forward slash ('/').Example: to find a
VirtualFile corresponding to the physical file with the specified path one
can use the followoing code: LocalFileSystem.getInstance().findFileByPath(path.replace(File.separatorChar, '/'));
findFileByPath in class VirtualFileSystempath - the path to find file by
VirtualFile if the file was found, null otherwisepublic 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.refresh(boolean)public VirtualFile refreshAndFindFileByPath(java.lang.String path)
VirtualFileSystemVirtualFile
corresponding to it.This method should be only called within write-action. See
Application.runWriteAction(java.lang.Runnable).
refreshAndFindFileByPath in class VirtualFileSystempath - the path
VirtualFile if the file was found, null otherwise
public void fireContentsChanged(java.lang.Object requestor,
VirtualFile file,
long oldModificationStamp)
fireContentsChanged in class VirtualFileSystem
protected void fireBeforeFileDeletion(java.lang.Object requestor,
VirtualFile file)
fireBeforeFileDeletion in class VirtualFileSystem
protected void fireFileDeleted(java.lang.Object requestor,
VirtualFile file,
java.lang.String fileName,
boolean isDirectory,
VirtualFile parent)
fireFileDeleted in class VirtualFileSystempublic java.lang.String getComponentName()
BaseComponent
getComponentName in interface BaseComponentpublic void initComponent()
BaseComponent
initComponent in interface BaseComponentpublic void disposeComponent()
BaseComponent
disposeComponent in interface BaseComponent
protected void fireBeforeContentsChange(java.lang.Object requestor,
VirtualFile file)
fireBeforeContentsChange in class VirtualFileSystem
public void forceRefreshFiles(boolean asynchronous,
VirtualFile... files)
VirtualFileSystem
forceRefreshFiles in class VirtualFileSystemasynchronous - if true, the reload is done asynchronously.files - the list of files to refresh (must not contain directories).public void forceRefreshFile(VirtualFile file)
forceRefreshFile in class VirtualFileSystem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||