public abstract class HttpFileSystemBase extends HttpFileSystem
| Constructor and Description |
|---|
HttpFileSystemBase(java.lang.String protocol) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFileListener(HttpVirtualFileListener listener) |
void |
addFileListener(HttpVirtualFileListener listener,
Disposable parentDisposable) |
VirtualFile |
createChild(VirtualFile parent,
java.lang.String name,
boolean isDirectory) |
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
|
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.
|
VirtualFile |
findFileByPath(java.lang.String path,
boolean isDirectory) |
java.lang.String |
getProtocol()
Gets the protocol for this file system.
|
boolean |
isFileDownloaded(VirtualFile file) |
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 |
removeFileListener(HttpVirtualFileListener listener) |
getInstanceaddVirtualFileListener, assertWriteAccessAllowed, copyFile, deleteFile, fireBeforeContentsChange, fireBeforeFileDeletion, fireBeforeFileMovement, fireBeforePropertyChange, fireContentsChanged, fireFileCopied, fireFileCreated, fireFileDeleted, fireFileMoved, firePropertyChanged, isReadOnly, moveFile, removeVirtualFileListener, renameFile, startEventPropagationisCaseSensitive, isValidNamepublic 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 VirtualFile findFileByPath(java.lang.String path, boolean isDirectory)
public void addFileListener(HttpVirtualFileListener listener)
addFileListener in class HttpFileSystempublic void addFileListener(HttpVirtualFileListener listener, Disposable parentDisposable)
addFileListener in class HttpFileSystempublic void removeFileListener(HttpVirtualFileListener listener)
removeFileListener in class HttpFileSystempublic boolean isFileDownloaded(VirtualFile file)
isFileDownloaded in class HttpFileSystempublic VirtualFile createChild(VirtualFile parent, java.lang.String name, boolean isDirectory)
createChild in class HttpFileSystempublic VirtualFile createChildDirectory(java.lang.Object requestor, VirtualFile vDir, java.lang.String dirName) throws java.io.IOException
VirtualFileSystemcreateChildDirectory in class DeprecatedVirtualFileSystemjava.io.IOExceptionVirtualFile.createChildDirectory(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 java.lang.String extractPresentableUrl(java.lang.String path)
VirtualFileSystemextractPresentableUrl in class VirtualFileSystempath - the path to get presentable URL forVirtualFile.getPresentableUrl()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 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 java.lang.String getProtocol()
VirtualFileSystemKeyedLazyInstanceEP.key.getProtocol in class VirtualFileSystemVirtualFile.getUrl(),
VirtualFileManager.getFileSystem(java.lang.String)