public class VirtualFileWrapper
extends java.lang.Object
VirtualFile
Constructor and Description |
---|
VirtualFileWrapper(java.io.File file)
Constructs wrapper based on java.io.File
|
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Tests whether the file passed to constructor exists.
|
java.io.File |
getFile()
Returns original java.io.File
|
VirtualFile |
getVirtualFile()
Refreshes LocalFileSystem and looks for VirtualFile
|
VirtualFile |
getVirtualFile(boolean createIfNotExist)
Looks for VirtualFile and tries to create new VirtualFile if
createIfNotExist is true and file is not exist.
|
public VirtualFileWrapper(java.io.File file)
file
- java.io.Filepublic boolean exists()
true
if and only if the file passed to constructor
exists; false
otherwisejava.lang.SecurityException
- If a security manager exists and its SecurityManager.checkRead(java.lang.String)
method denies read access to the file or directorypublic VirtualFile getVirtualFile()
public VirtualFile getVirtualFile(boolean createIfNotExist)
createIfNotExist
- if true and java.io.File is not exist,
VirtualFileWrapper will try to create new filepublic java.io.File getFile()