public class PatchIndexFile
extends java.lang.Object
PatchContributor.| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
separator  | 
static char | 
separatorChar  | 
| Constructor and Description | 
|---|
PatchIndexFile(java.io.File directoryFile, java.lang.String path)
Constructs a new  
PatchIndexFile for the given directory and path. | 
| Modifier and Type | Method and Description | 
|---|---|
protected boolean | 
createBackup(java.lang.String backupFileName)
Creates the index backup file on the filesystem, copying file contents. 
 | 
protected boolean | 
createNewFile()
Creates a new index file on the filesystem. 
 | 
protected boolean | 
delete()
Deleles the index file on the filesystem. 
 | 
protected boolean | 
exists()
Gets whether the index file exists on the filesystem. 
 | 
protected java.lang.String | 
getBackupName()
Gets the file name for the index backup file to be created. 
 | 
java.io.File | 
getDirectoryFile()
Gets the working directory file of the index file. 
 | 
java.io.File | 
getFile()
Gets the index file as a  
File. | 
java.lang.String | 
getPath()
Gets the path of the index file. 
 | 
protected java.lang.String | 
getRevision()
Gets the revision number of the index file. 
 | 
protected TextBuffer | 
getTextBuffer()
Gets the internal text buffer for the index file. 
 | 
protected boolean | 
isDirectory()
Gets whether the index file exists on the filesystem as a directory. 
 | 
protected long | 
lastModified()
Gets the modification time of the index file. 
 | 
protected boolean | 
saveTextBuffer()
Saves the internal text buffer to the filesystem. 
 | 
void | 
setEncoding(java.lang.String charsetName)
Sets the encoding character set of the index file. 
 | 
protected boolean | 
setLastModified(long modTime)
Sets the modification time of the index file. 
 | 
protected boolean | 
setReadOnly(boolean readOnly)
Sets the read-only flag for the index file 
 | 
void | 
setTextBuffer(TextBuffer textBuffer)
Sets the internal text buffer for the index file. 
 | 
public static final char separatorChar
public static final java.lang.String separator
public PatchIndexFile(java.io.File directoryFile,
              java.lang.String path)
PatchIndexFile for the given directory and path.directoryFile - the working directory file.path - the path.public void setTextBuffer(TextBuffer textBuffer)
textBuffer - the text buffer.public void setEncoding(java.lang.String charsetName)
charsetName - the encoding name.public java.io.File getDirectoryFile()
public java.lang.String getPath()
public java.io.File getFile()
File.protected boolean exists()
true if the file exists.protected boolean isDirectory()
true if the file exists as a directory.
protected boolean createNewFile()
                         throws java.io.IOException
true if the index file was successfully created.java.io.IOException - if an I/O error occurred.protected TextBuffer getTextBuffer() throws java.io.IOException
java.io.IOException - if an I/O error occurred while reading the file.
protected boolean saveTextBuffer()
                          throws java.io.IOException
true if the text buffer was successfully saved.java.io.IOException - if an I/O error occurred while writing the file.protected java.lang.String getBackupName()
protected boolean createBackup(java.lang.String backupFileName)
                        throws java.io.IOException
backupFileName - the backup file name.true if the backup file was successfully created.java.io.IOException - if an I/O error occurred copying file contents.protected boolean delete()
true if the index file was successfully deleted.protected boolean setLastModified(long modTime)
modTime - the modification time, in milliseconds since Epoch.true if the modification file was set.protected long lastModified()
protected boolean setReadOnly(boolean readOnly)
readOnly - true if the index file should be set read-only.true if the read-only flag was set.protected java.lang.String getRevision()