public final class VCSFileProxy extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
canWrite()
Determines whether this file is writable or not.
|
static VCSFileProxy |
createFileProxy(File file)
Creates a VCSFileProxy based on io.File.
|
static VCSFileProxy |
createFileProxy(FileObject fileObject)
Creates a VCSFileProxy based on the given
FileObject. |
static VCSFileProxy |
createFileProxy(VCSFileProxy parent,
String child)
Creates a new VCSFileProxy from the given parent and child name
|
boolean |
equals(Object obj) |
boolean |
exists()
Determines whether this file exists or not.
|
String |
getName()
Returns the name of this file.
|
VCSFileProxy |
getParentFile()
Returns this files parent or
null if this file doesn't have a parent. |
String |
getPath()
Determines this files path.
|
int |
hashCode() |
boolean |
isDirectory()
Determines whether this file is a directory or not.
|
boolean |
isFile()
Determines whether this file is a normal file or not.
|
long |
lastModified()
Determines the last time this file was modified.
|
VCSFileProxy[] |
listFiles()
Returns an array of files located in a directory given by this file.
|
VCSFileProxy |
normalizeFile()
Normalize a file path to a clean form.
|
File |
toFile()
Returns the corresponding java.io.File in case this instance was created
based either on java.io.File or a
FileObject based on java.io.File. |
FileObject |
toFileObject()
Returns the corresponding FileObject.
|
String |
toString() |
public static VCSFileProxy createFileProxy(File file)
file - the file to be represented by VCSFileProxypublic static VCSFileProxy createFileProxy(VCSFileProxy parent, String child)
parent - the parent filechild - the child namepublic static VCSFileProxy createFileProxy(FileObject fileObject)
FileObject. In case there is a
corresponding java.io.File to the FileObject the the io.File will be used as in
createFileProxy(java.io.File).fileObject - the file to be represented by VCSFileProxypublic String getPath()
FileObject.getPath() or File.getAbsoluteFile().File.getPath(),
FileObject.getPath()public boolean isDirectory()
true if this file exists and is a directory, otherwise falseFile.isDirectory()public boolean isFile()
true if this file is a normal file, otherwise falseFile.isFile()public boolean canWrite()
true if this file is writable, otherwise falseFile.canWrite()public long lastModified()
long value representing the time the file was
last modified.File.lastModified()public VCSFileProxy getParentFile()
null if this file doesn't have a parent.
This method might block for a longer time and shouldn't be called in EDT.File.getParentFile()public boolean exists()
true if this files exists, otherwise falseFile.exists()public VCSFileProxy[] listFiles()
null if this file isn't a directory or an error occurs.File.listFiles()public File toFile()
FileObject based on java.io.File.
This method might block for a longer time and shouldn't be called in EDT.null if none
is available.createFileProxy(java.io.File),
createFileProxy(org.openide.filesystems.FileObject)public FileObject toFileObject()
null if none availablepublic VCSFileProxy normalizeFile()
FileUtil.normalizePath(java.lang.String)Built on May 24 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.