| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
VirtualFileManager is used to get instances of VirtualFile and Context
and make some global operation with filesystem, as saving its cache.
Only one instance of manager exists in system. You can get it by VirtualFileManagerAccess.
| Method Summary | |
void | addVirtualFileListener(VirtualFileListener listener) |
VirtualFileContext | createFileContext()Creates empty context |
VirtualFileContext | createFileContext(PropertyMap originalContext)Creates context inherited from original context |
void | discardAllCaches(VirtualFileContext context)Discards any changes made to files but do not reload files from disk. |
void | externalUpdate(VirtualFile root, boolean recursive)Checks timestamps of file(s) on disk and (re)load their contents if file(s) were updated. |
void | externalUpdateAll(VirtualFileContext context)Checks timestamps of file(s) on disk and (re)load their contents if file(s) were updated. |
VirtualFileManagerContext | getContext()Return default context for storing shared properties |
VirtualFileErrorUI | getErrorUI() |
VirtualFile | getVirtualFile(String url)Gets VirtualFile with empty context. |
VirtualFile | getVirtualFile(String url, VirtualFileContext context)Gets VirtualFile with specified context. |
VirtualFile | getVirtualFile(String parentUrl, String relativePath, VirtualFileContext context)Derive file full name from parent full name and relative path. |
VirtualFile | getVirtualFile(VirtualFile parent, String relativePath)Gets VirtualFile with full name, derived from parent full
name and relativePath. |
boolean | isAbsolutePath(String path) |
VirtualFileVolume | mount(String root)mounting of a new volume representing by folder named "root" |
void | removeVirtualFileListener(VirtualFileListener listener) |
void | saveAllCaches(VirtualFileContext context)Writes all unsaved caches to disk. |
void | setErrorUI(VirtualFileErrorUI ui)Register error UI globaly for all operations. |
VirtualFileEnumeration | unsavedFiles(VirtualFileContext context)Returns enumeration of files, whose cache is to be written to disk. |
VirtualFileEnumeration | unsavedFiles() |
| Method Detail |
public void addVirtualFileListener(VirtualFileListener listener)
public VirtualFileContext createFileContext()
public VirtualFileContext createFileContext(PropertyMap originalContext)
public void discardAllCaches(VirtualFileContext context)
throws java.io.IOException
public void externalUpdate(VirtualFile root, boolean recursive)
throws java.io.IOException
public void externalUpdateAll(VirtualFileContext context)
throws java.io.IOException
public VirtualFileManagerContext getContext()
public VirtualFileErrorUI getErrorUI()
VirtualFileErrorUI.public VirtualFile getVirtualFile(String url)
VirtualFile with empty context. File may or maynot exist.
url param is URL of requested file. This realization supports only one URL scheme: 'file'.
It's assumed, that everything after "file:" is PATH in local file system. On Windows platforms native fullname of file (with all backslashes) can be used as PATH. Optionally it can have "//" prefix. On Unix platforms native fullname of file is allowed in file: URL. The number of leading slashes shouldn't be less than one.
On every platform url in form, returned by file.toURL().
, where
toString()file is an instance of java.io.File, is accepted.
Currently that's exactly what getUrl method would return.
In this realization fullpath alone is also applicable as url param.
For unsupported url scheme method returns instance, which throws IOException nearly in all operation.
url URL of file being requestedVirtualFile with specified full namepublic VirtualFile getVirtualFile(String url, VirtualFileContext context)
VirtualFile with specified context. File may or maynot exist.url URL of file being requestedcontext context, which will be assigned to new VirtualFileVirtualFile with specified full namepublic VirtualFile getVirtualFile(String parentUrl, String relativePath, VirtualFileContext context)
VirtualFile as
getVirtualFile(String fullName, VirtualFileContext context)relativePath path, which can contain '..' entries. Note that this path
VirtualFileType of fileVirtualFile with specified full namepublic VirtualFile getVirtualFile(VirtualFile parent, String relativePath)
VirtualFile with full name, derived from parent full
relativePath. New VirtualFile inherites parent's context.parent VirtualFile, whose full name is used as base full name. Note that this path
VirtualFileType of filerelativePath path, which can contain '..' entriesVirtualFile with specified full namepublic boolean isAbsolutePath(String path)
public VirtualFileVolume mount(String root)
public void removeVirtualFileListener(VirtualFileListener listener)
public void saveAllCaches(VirtualFileContext context)
throws java.io.IOException
public void setErrorUI(VirtualFileErrorUI ui)
public VirtualFileEnumeration unsavedFiles(VirtualFileContext context)
public VirtualFileEnumeration unsavedFiles()
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||