|
JDeveloper SCM API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for URL-wrapping file representatives, holding convenience methods for operations to facilitate on a per-file basis. The use of these files as provided to operations is recommended, but access and conversion methods for other resource types are also given. This interface provides a useful and layer of separation between the underlying form of the resource an extension implementation.
Method Summary | |
void |
copy(SCMFile dst)
Copies the contents of the file at this location to another. |
void |
delete()
Deletes the represented file from the filesystem. |
boolean |
exists()
Asks whether a file exists at the URL. |
java.lang.Object |
getData()
Get the arbitrary data object which is stored with this file. |
java.lang.String |
getExtension()
Gets the suffix extension of this file, with the '.' prefix. |
java.lang.String |
getFileName()
Gets the name of the file, not including any URL protocol, hostname authentication, directory path, anchor, or query. |
javax.swing.Icon |
getIcon()
Provides access to the file element's icon. |
SCMFileStatus |
getLatestStatus()
Gets the status of this file through the client, flushing any cached value. |
java.lang.String |
getName()
Gets the name of this file, ie. |
SCMFile |
getParent()
Gets the parent for this file, a directory. |
java.lang.String |
getPath()
Gets the path of the file, translated into local filesystem form from the file's URL. |
java.util.Iterator |
getProjectSources()
Gets all files for the source path of this project file. |
SCMFileStatus |
getStatus()
Gets the status of this file through the client, represented by the client's chosen status constant. |
java.net.URL |
getURL()
Gets the Uniform Resource Locator for the file. |
boolean |
hasParent(SCMFile file)
Asks whether the given file is a parent directory for this file. |
boolean |
isDirectory()
Asks whether this file, as represented by the URL, is a directory. |
boolean |
isProject()
Asks whether this file represents a project in the IDE. |
boolean |
isReadOnly()
Asks whether the file is read-only. |
boolean |
isWorkspace()
Asks whether this file represents a workspace in the IDE. |
void |
renameTo(SCMFile dst)
Renames this file to the name of the given destination file. |
java.io.File |
toFile()
Converts this file to a java 'io' package File object. |
Method Detail |
public javax.swing.Icon getIcon()
public java.net.URL getURL()
public boolean exists()
public boolean isDirectory()
public SCMFileStatus getStatus() throws SCMException
public SCMFileStatus getLatestStatus() throws SCMException
getStatus()
. Only make this call when you cannot be sure that
the client has caused a file state change, or when you can be sure the
file state has changed but cannot predict the resulting status.public java.lang.String getFileName()
public java.lang.String getName()
public java.lang.String getPath()
public java.lang.String getExtension()
public SCMFile getParent()
public boolean hasParent(SCMFile file)
public boolean isWorkspace()
public boolean isProject()
public java.util.Iterator getProjectSources()
public java.io.File toFile()
public java.lang.Object getData()
public boolean isReadOnly()
public void delete() throws SCMException
SCMException
- if the file deletion could not be achieved, for example if the
location was found to be read-only.public void renameTo(SCMFile dst) throws SCMException
dst
- the desired destination for the renamed file.SCMException
- if the file rename could not be achieved, for example if target
folder creation failed.public void copy(SCMFile dst) throws SCMException
dst
- the desired destination for the copied file.SCMException
- if the file copy could not be achieved, for example if the target
exists as a different file type (directory vs. file).
|
Copyright © 2002 Oracle Corporation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |