|
org.netbeans.modules.versioning.core/1 1.5.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.versioning.core.api.VCSFileProxy
public final class VCSFileProxy
Represents a file on a file system.
| Method Summary | |
|---|---|
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. |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static VCSFileProxy createFileProxy(File file)
file - the file to be represented by VCSFileProxy
public static VCSFileProxy createFileProxy(VCSFileProxy parent,
String child)
parent - the parent filechild - the child name
public 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 VCSFileProxy
public String getPath()
FileObject.getPath() or File.getAbsoluteFile().
File.getPath(),
FileObject.getPath()public String getName()
()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 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)public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
org.netbeans.modules.versioning.core/1 1.5.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||