public final class File extends Item
| Modifier and Type | Class and Description |
|---|---|
static class |
File.AddResult
The class holds return information specific to the file add operation.
|
static class |
File.CharacterSet
The character set of a working file on disk.
|
static class |
File.CheckInResult
The class holds return information specific to the file checkin
operation.
|
static class |
File.CheckOutResult
The class holds return information specific to the file checkout
operation.
|
static class |
File.Compression
File compression level.
|
static interface |
File.Digest
The Digest interface specifies the necessary information to determine if
a file on disk has changed from some checkpoint.
|
static class |
File.EOLFormat
The EOL format of a text file on disk.
|
static interface |
File.Keyword
A Keyword object that encapsulates information about a File keyword.
|
static class |
File.KeywordFlag
File keyword flag.
|
static class |
File.KeywordReader
Extends the java.io.Reader class to expand or unexpand keywords in a file
or other data source.
|
static class |
File.Operation
An Operation Context for a given File, used by the CPC's Custom Trigger
|
static class |
File.Result
return information common to the file operations of add, checkin and
checkout
|
static interface |
File.Revision
The Revision interface globally and uniquely identifies a specific
revision of a StarTeam object.
|
static class |
File.Status
The current status of the file.
|
static class |
File.StorageType
The mechanism used to store this File content in the repository
|
static class |
File.Stream
Provides utility functions for manipulating File streams.
|
static class |
File.SyncRecord
a stock Sync Record Implementation to create sync records in syncdb
|
static class |
File.Type
The Type of File items.
|
static class |
File.WebCacheFile
File accessor for cached SDK Items contained objects are obtained from
the artifact cache
|
static class |
File.WebCacheWorkSpaceSync
A serializable implementation of WorkspaceSync that can be used to
calculate status through the WebCache Interfaces.
|
static interface |
File.WorkspaceSync
The WorkspaceSync interface specifies the pairing of the two important
pieces of information needed to know what is on a user's local disk:
Revision and Digest.
|
Item.WebCacheItemViewMember.LockType, ViewMember.MyLock, ViewMember.ShareState, ViewMember.WebCacheViewMemberVersionedObject.WebCacheVersionedObjectTrackedObject.WebCacheTrackedObjectLiveObject.WebCacheLiveObjectTypedResource.BranchState| Modifier and Type | Method and Description |
|---|---|
void |
addNotifiedUser(User user)
Adds the specified user object as one to be notified.
|
long |
computeCompareMD5(java.io.File workingFile,
MD5 md5)
Derives an MD5 signature of this file's working file on disk, if it were
to be stored in the StarTeam repository.
|
void |
convertArchive(boolean useDeltaStorage,
int compressionLevel)
This method causes the server to convert all versions stored in the
archives associated with the file to the storage parameters specified.
|
void |
convertToNativeIIArchive(boolean bDeleteOldArchives)
Convert this File's archives to Native II format.
|
static File |
create(Folder prnt)
Create a File in the specified parent folder.
|
boolean |
deleteLocalFile(java.io.File file)
Deletes the specified local file and has the side effect of deleting sync
information from the server about the file.
|
void |
deleteSyncInfo(java.io.File file)
Removes sync information from this File object's Server.
|
java.lang.String |
getArchiveName()
The file name of this file's archive file in the vault.
|
static File.Keyword[] |
getBlankKeywords()
Returns an array of the default StarTeam keywords.
|
File.CharacterSet |
getCharacterSet()
Gets the character set used by this file.
|
File.Compression |
getCompression()
Gets the compression level of the archive file in the vault.
|
DateTime |
getContentModifiedTime()
Gets the "last modified" time of the working file when it was checked in
to create this version.
|
int |
getContentVersion()
Gets the content version number for this file.
|
java.lang.String |
getDescription()
Returns the description of this file.
|
File.EOLFormat |
getEOLFormat()
Gets the end-of-line format used by this file's working files on disk.
|
java.lang.String |
getExtension()
Returns the file name extension.
|
File.WorkspaceSync |
getFileSyncInfo(MD5 compareMD5,
long compareSize,
MD5 syncMD5,
long syncSize,
DateTime syncTime)
Attempts to determine what version of the file is actually on disk.
|
java.lang.String |
getFullName()
Returns the concatenation of this file's name with the working directory
of the file's parent folder.
|
int |
getHiveID()
Gets the ID of the hive where the archive file is stored in the vault.
|
File.KeywordFlag |
getKeywordFlag()
returns the KeywordFlag property value for this File
|
File.Status |
getLastKnownStatus()
Returns the last known status of the default working file relative to the
file in the repository, using only information provided by the client
during the last status update operation.
|
LocalFileSystemPropertyProvider |
getLocalFileSystemPropertyProvider()
Returns the registered provider for local file properties and
synchronization status.
|
MD5 |
getMD5()
The MD5 of the file contents for this version.
|
File |
getMergeVersion()
Returns a revision from this file's history that represents the most
recent common ancestor of this file with the last known revision on disk.
|
java.lang.String |
getName()
Returns the name of this file.
|
User[] |
getNotifiedUsers()
Returns the set of users who are notified
|
File.Type.PropertyCollection |
getProperties()
Gets the PropertyCollection for this File.
|
long |
getSize()
The size of this file in the repository.
|
File.Status |
getSmartStatus()
Gets the status of the default working file relative to the latest
version of this file in the repository.
|
File.Status |
getSmartStatus(java.io.File file)
Gets the status of the given working file relative to the latest version
of this file in the repository.
|
File.Status |
getStatus()
Gets the status of the default working file relative to the latest
version of this file in the repository.
|
File.Status |
getStatus(java.io.File file)
Gets the status of the given working file relative to the latest version
of this file in the repository.
|
File.Status |
getStatus(long size,
DateTime lastModified)
Returns the status of the default working file relative to the file in
the repository, using the given size and last modified date of the file.
|
File.Status |
getStatus(MD5 md5)
Returns the status of the default working file relative to the file in
the repository, using the given size MD5 signature of the file.
|
File.Status |
getStatusNow()
refresh the status information from the server and return it
|
java.lang.String |
getSymbolicLinkTarget()
Returns the target path if file is a symbolic link, null otherwise.
|
int |
getSyncBranchVersion()
Gets the branch version of the last known revision of this file on disk.
|
int |
getSyncContentVersion()
Gets the content version of the last known revision of this file on disk.
|
MD5 |
getSyncMD5()
Gets the MD5 of this file's last known revision on disk.
|
DateTime |
getSyncModifiedTime()
Gets the working file modified time of the last known revision of this
file on disk.
|
long |
getSyncSize()
Gets the working file size of the last known revision of this file on
disk.
|
int |
getSyncViewVersion()
Gets the view version of the last known revision of this file on disk.
|
boolean |
getUsesKeywords()
Tells whether or not this file will use keyword expansion.
|
java.lang.Object |
getValue(Property property)
Returns the value of the property.
|
int |
getVaultVersion()
Returns the vault version number for this file.
|
DateTime |
getWorkingFileModifiedTime()
Gets the local working file's modified time.
|
java.lang.String |
getWorkingFileName()
Gets the name of the local working file.
|
java.lang.String |
getWorkingFilePath()
Gets the full path to the local working file.
|
long |
getWorkingFileSize()
Gets the local working file's size, in bytes.
|
boolean |
isBinary()
Tells whether this file (in the repository) has been determined to be a
binary file.
|
boolean |
isExecutable()
Determines whether or not this file has been marked executable in the
repository.
|
static boolean |
isFileContentMixedEOL(java.io.File f)
Returns true if the file contains a mixed set of CRs, LFs and/or CRLF's
Files that contain this pattern are automatically treated as BINARY files
iff the Server Configuration Option MixedEOLAsBinary is set to true.
|
static boolean |
isInSyncByMD5(java.io.File file,
File.WorkspaceSync syncInfo)
Determines whether or not the given file has the MD5 signature indicated
in the given WorkspaceSync record.
|
static boolean |
isInSyncByTime(java.io.File file,
File.WorkspaceSync syncInfo)
Determines whether or not the given file has the size and last modified
date indicated in the given WorkspaceSync record.
|
boolean |
isSyncInRevisionHistory()
Determines whether or not the last known revision of this file on disk is
somewhere in the file's linear revision history.
|
boolean |
isSyncKnown()
Determines whether or not information about the last known version on
disk is available.
|
boolean |
isUnicode()
Tells whether this file (in the repository) has been determined to be a
UNICODE file.
|
boolean |
isWorkingFileAvailable()
Determines whether or not the local working file exists on disk.
|
boolean |
isWorkingFileExecutable()
Determines whether or not the local working file is executable.
|
java.io.File |
moveLocalFile(java.io.File fromFile,
java.lang.String toFolderPath)
Moves the local file to the specified folder and has the side effect of
moving the status information from the original file to the newly created
one Deletes the original file and it's status information at the end of
the move
|
void |
removeAndDeleteLocal()
Removes the file item from its parent folder.
|
void |
removeNotifiedUser(User user)
Removes the specified user object as one to be notified.
|
void |
rename(java.lang.String newName)
Renames this file to a new name along with the side effect of changing
the corresponding local file's name as well.
|
void |
resyncStatus(MD5 compareMD5,
long compareSize,
MD5 syncMD5,
long syncSize,
DateTime syncTime)
Attempts to update the repository information about what version of the
file is actually on disk.
|
RollbackSession |
rollback()
rollback the contents of the specified revision of this file on disk.
|
void |
setCharacterSet(File.CharacterSet s)
Sets the character set used by this file.
|
void |
setContentModifiedTime(DateTime time)
Sets this file's content modification time.
|
void |
setDescription(java.lang.String description)
Sets the description of this file.
|
void |
setEOLFormat(File.EOLFormat format)
Sets the end-of-line format used by this file's working files on disk.
|
void |
setExecutable(boolean isExecutable)
Change this file executable marking in the repository.
|
void |
setLocalFileSystemPropertyProvider(LocalFileSystemPropertyProvider provider)
Registers a provider for local file properties and synchronization
status.
|
void |
setName(java.lang.String name)
Sets a new name for this file.
|
void |
setSymbolicLinkTarget(java.lang.String targetPath)
Sets the target path if this file is a symbolic link.
|
java.lang.String |
toString()
Returns the name of this file.
|
File.Status |
updateStatus()
Attempts to update the repository information about what version of the
file is actually on disk.
|
static void |
updateStatus(File[] files,
LocalFileSystemPropertyProvider aProvider)
This method sets the status for each file item in an array.
|
void |
updateStatus(long size,
DateTime lastModified)
Updates the server's status information to reflect the fact that the
local file's content has the given size and last modified date.
|
void |
updateStatus(long fileSize,
DateTime lastModified,
MD5 signature)
Updates the server's status information to reflect the fact that the
local file's content has the given size, last modified date, and MD5
signature.
|
void |
updateStatus(MD5 signature)
Updates the server's status information to reflect the fact that the
local file's content has the given MD5 signature.
|
void |
updateStatusAfterMerge()
Updates the status information to reflect the fact that the local file's
contents were derived from this file's contents.
|
copy, deleteMergePoint, getCommonAncestor, getDebugString, getDisplayableProperties, getItemID, getMergeHistory, getNewRevisionComment, getParentContainer, getParentFolder, getParentFolderHierarchy, getParentFolderName, getParentFolderPath, getParentFolderQualifiedName, getSharedChangePackages, getSharedTraces, isEqualTo, isReverseShareRecommended, moveTo, moveTo, recordMergePoint, remove, resolve, resolveMergePoint, resolveMergePointEx, reverseShareTo, reverseShareTo, shareTo, smartShareToequals, findLinks, getAllLabels, getAllShares, getAttachedLabels, getAttachments, getBehavior, getCache, getComment, getDeletedBy, getDeletedShares, getDeletedTime, getDisplayValue, getDotNotation, getExclusiveLocker, getExternalID, getExternalURL, getFromHistory, getFromHistory, getFromHistory, getFromHistory, getHistory, getID, getIntegerArrayValue, getLocker, getMyLockType, getParentRevision, getPresentationID, getRights, getRootObjectID, getShare, getShare, getTraces, getView, getViewMemberRevisions, getViewVersion, getVMID, hashCode, hasPermissions, isBookmarked, isBranchable, isDeleted, isDiscarded, isDisembodied, isEqualTo, isFloating, isPinned, isReadOnly, isRootShare, isUnread, lockExclusive, lockExclusive, lockNonExclusive, modifyBookmark, modifyReadStatus, putLock, remove, setAttachments, setBehavior, setBranchOnChange, setComment, setExternalID, setExternalURL, setFixedConfiguration, setFloatingConfiguration, setRights, setValue, toRESTUrl, unlock, update, update, updateRevisionCommentgetBranchRevision, getRevisionNumber, getShortComment, getViewVersion, isFromHistory, setShortCommentgetModifiedBy, getModifiedTimegetCreatedBy, getCreatedTime, toStarTeamURLaddToIntegerArray, getBooleanValue, getByteArrayValue, getCachedProperties, getContentValue, getDateTimeValue, getDateValue, getDisplayName, getDoubleValue, getEnumDisplayName, getEnumeratedValues, getIntegerValue, getLinkValue, getLongValue, getObjectID, getPossibleValues, getServer, getStringValue, getTimeSpanValue, getType, hasCachedProperties, hasValue, isDirty, isDirty, isNew, removeFromIntegerArray, setBooleanValue, setByteArrayValue, setContentValue, setDateTimeValue, setDateValue, setDoubleValue, setEnumeratedValue, setEnumeratedValues, setIntegerArrayValue, setIntegerValue, setLinkValue, setLongValue, setStringValue, setTimeSpanValuegetServer, getTypepublic static File create(Folder prnt)
prnt - the parent folderpublic java.lang.String getFullName()
DisembodiedException - if this File is disembodiedViewMember.isDisembodied()public File.Type.PropertyCollection getProperties()
public java.lang.String getName()
File.getFullName(),
LiveObject.Type.NameProperty,
File.Type.PropertyCollection.NAMEpublic void setName(java.lang.String name)
update().name - the new name of this fileViewMember.update(),
LiveObject.Type.NameProperty,
File.Type.PropertyCollection.NAMEpublic void setSymbolicLinkTarget(java.lang.String targetPath)
update().targetPath - the target path for this symbolic link fileFile.Type.PropertyCollection.SYMBOLIC_LINK_TARGET,
ViewMember.update()public java.lang.String getDescription()
LiveObject.Type.DescriptionProperty.NAMEpublic void setDescription(java.lang.String description)
update() or one of the checkin
methods.description - the new description of this fileLiveObject.Type.DescriptionProperty.NAME,
ViewMember.update()public int getVaultVersion()
File.Type.VaultVersionPropertypublic java.lang.Object getValue(Property property) throws NoSuchPropertyException
ViewMembergetValue in class ViewMemberproperty - the desired propertyjava.lang.ObjectNoSuchPropertyExceptionpublic int getContentVersion()
File.Type.ContentVersionProperty,
File.Type.PropertyCollection.CONTENT_VERSION,
File.getStatus()public DateTime getContentModifiedTime()
File.Type.PropertyCollection.CONTENT_MODIFIED_TIME,
File.setContentModifiedTime(DateTime)public void setContentModifiedTime(DateTime time)
time - the content modification time for this fileFile.Type.PropertyCollection.CONTENT_MODIFIED_TIME,
File.getContentModifiedTime()public long getSize()
File.Type.SizeProperty,
File.Type.PropertyCollection.SIZEpublic java.lang.String getSymbolicLinkTarget()
File.Type.SymbolicLinkTargetPropertypublic java.lang.String getArchiveName()
File.Type.ArchiveNameProperty,
File.Type.PropertyCollection.ARCHIVE_NAMEpublic int getHiveID()
File.Type.HiveProperty,
File.Type.PropertyCollection.HIVEpublic File.KeywordFlag getKeywordFlag()
File.Type.KeywordFlagProperty,
File.Type.PropertyCollection.KEYWORD_FLAGpublic MD5 getMD5()
File.Type.MD5Property,
File.Type.PropertyCollection.MD5,
MD5public File.Compression getCompression()
File.Compression,
File.Type.CompressionProperty,
File.Type.PropertyCollection.COMPRESSIONpublic File getMergeVersion()
DisembodiedException - if this File is disembodiedViewMember.isDisembodied()public boolean isBinary()
FileUtils.isBinary(java.io.File)public boolean isUnicode()
FileUtils.isUnicode(byte[], int)public File.CharacterSet getCharacterSet()
File.isBinary(),
File.isUnicode(),
File.Type.CharacterSetProperty,
File.Type.PropertyCollection.CHARACTER_SETpublic void setCharacterSet(File.CharacterSet s)
s - The character set. May not be null.File.Type.CharacterSetProperty,
File.Type.PropertyCollection.CHARACTER_SETpublic File.EOLFormat getEOLFormat()
File.EOLFormat,
File.Type.EOLFormatProperty,
File.Type.PropertyCollection.EOL_FORMATpublic void setEOLFormat(File.EOLFormat format)
format - The end-of-line format. Must not be null.public boolean isExecutable()
File.Type.IsExecutableProperty,
File.Type.PropertyCollection.IS_EXECUTABLEpublic void setExecutable(boolean isExecutable)
isExecutable - true if the file has been marked executable in the repository;
false otherwise.File.Type.IsExecutableProperty,
File.Type.PropertyCollection.IS_EXECUTABLEpublic void rename(java.lang.String newName)
newName - the file's new namepublic void convertArchive(boolean useDeltaStorage,
int compressionLevel)
useDeltaStorage - true if the archive should use delta storagecompressionLevel - desired compression level. This value must be one of the
possible values for the Compression enumerated property.public void convertToNativeIIArchive(boolean bDeleteOldArchives)
bDeleteOldArchives - True if old archives should be deleted, otherwise false.public static boolean isFileContentMixedEOL(java.io.File f)
throws java.io.IOException
f - the file whose content is to be testedjava.io.IOException - if the file cannot be opened or processed completelypublic File.Status updateStatus() throws java.io.IOException
Example uses of this would be if you copied the file to its new location through the OS rather than StarTeam the file's status would be "Unknown" If the local file had the same contents as the tip version of the file in the repository then further status computations would report the file as "Current".
java.io.IOException - if an error occurs while reading the local fileDisembodiedException - if this File is disembodiedViewMember.isDisembodied(),
File.getStatus()public void resyncStatus(MD5 compareMD5, long compareSize, MD5 syncMD5, long syncSize, DateTime syncTime)
This method is similar to updateStatus, except that information about the working file is provided explicitly by the caller. The working file itself is not used, and in fact does not need to be accessible. This is useful, for example, if the actual working file resides on a remote client workstation.
compareMD5 - The original MD5 signature of this file, as stored in the
StarTeam repository. This is the signature that is compared
against the signatures of the various revisions of this file,
looking for a match. The compareMD5 signature may be different
from the syncMD5 signature as a result of compensating for the
effects of expanding keywords and performing end-of-line
conversion on checkout. The compareMD5 signature is typically
derived using File.Stream.computeCompareMD5().compareSize - The original size of this file, as stored in the StarTeam
repository. This may be different from syncSize as a result of
compensating for the effects of expanding keywords and
performing end-of-line conversion on checkout.syncMD5 - The MD5 signature of the actual working file on disk.
Typically derived using File.Stream.computeSyncMD5().syncSize - The size of the actual working file on disk.syncTime - The last modified date of the actual working file on disk.DisembodiedException - if this File is disembodiedViewMember.isDisembodied(),
File.updateStatus(),
File.getStatus(),
File.Stream.computeCompareMD5(java.io.File, boolean, boolean, com.starteam.util.MD5),
File.Stream.computeSyncMD5(java.io.File, com.starteam.util.MD5),
File.Statuspublic File.WorkspaceSync getFileSyncInfo(MD5 compareMD5, long compareSize, MD5 syncMD5, long syncSize, DateTime syncTime)
This method is similar to resyncStatus, except that the status information is returned to the caller, rather than being cached with the Server object. This is useful for server-based applications running on behalf of a remote client, when running against a StarTeam server that supports client-managed status.
compareMD5 - The original MD5 signature of this file, as stored in the
StarTeam repository. This is the signature that is compared
against the signatures of the various revisions of this file,
looking for a match. The compareMD5 signature may be different
from the syncMD5 signature as a result of compensating for the
effects of expanding keywords and performing end-of-line
conversion on checkout. The compareMD5 signature is typically
derived using File.Stream.computeCompareMD5().compareSize - The original size of this file, as stored in the StarTeam
repository. This may be different from syncSize as a result of
compensating for the effects of expanding keywords and
performing end-of-line conversion on checkout.syncMD5 - The MD5 signature of the actual working file on disk.
Typically derived using File.Stream.computeSyncMD5().syncSize - The size of the actual working file on disk.syncTime - The last modified date of the actual working file on disk.DisembodiedException - if this File is disembodiedViewMember.isDisembodied(),
File.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime),
File.Stream.computeCompareMD5(java.io.File, boolean, boolean, com.starteam.util.MD5),
File.Stream.computeSyncMD5(java.io.File, com.starteam.util.MD5),
File.Statuspublic void removeAndDeleteLocal()
throws java.io.IOException
java.io.IOException - if there is a problem deleting the local fileDisembodiedException - if this File is disembodiedViewMember.isDisembodied()public boolean deleteLocalFile(java.io.File file)
throws java.io.IOException
file - the local file to deletejava.io.IOException - if the file is a directory or other error occurs trying to
delete the fileDisembodiedException - if this File is disembodiedViewMember.isDisembodied()public java.io.File moveLocalFile(java.io.File fromFile,
java.lang.String toFolderPath)
throws java.io.IOException
fromFile - the local file to be movedtoFolderPath - the folder to move it to.java.io.IOException - if an unexpected error occurs in the processpublic void deleteSyncInfo(java.io.File file)
file - the local file for which to delete status informationDisembodiedException - if this File is disembodiedViewMember.isDisembodied()public void updateStatus(long size,
DateTime lastModified)
The MD5 signature is assumed to be unknown, and any previously specified value will remain unchanged.
This is useful when the working file resides on a remote workstation, and the remote client is able to calculate the status parameters.
size - The size of the working file on disk.lastModified - The last modified date of the working file.DisembodiedException - if this File is disembodiedViewMember.isDisembodied(),
File.getStatus(),
File.updateStatus(),
File.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime),
File.Statuspublic void updateStatus(MD5 signature)
The file size and last modified date are assumed to be unknown. Any previously specified values will remain unchanged.
This is useful when the working file resides on a remote workstation, and the remote client is able to calculate the status parameters.
signature - The MD5 signature of the working file.DisembodiedException - if this File is disembodiedViewMember.isDisembodied(),
File.getStatus(),
File.updateStatus(),
File.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime),
File.Statuspublic void updateStatus(long fileSize,
DateTime lastModified,
MD5 signature)
This is useful when the working file resides on a remote workstation, and the remote client is able to calculate the status parameters.
fileSize - The size of the working file on disk. A negative value
indicates that the size is unknown.lastModified - The last modified date of the working file. null indicates
that the last modified date is unknown.signature - The MD5 signature of the working file. null indicates that the
signature is unknown.
Use null DateTime to indicate last modified time is unknown.DisembodiedException - if this File is disembodiedViewMember.isDisembodied(),
File.updateStatus(),
File.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime),
File.Statuspublic void updateStatusAfterMerge()
throws java.io.IOException
java.io.IOException - if there are problems reading the local fileDisembodiedException - if this File is disembodiedViewMember.isDisembodied()public int getSyncViewVersion()
File.Type.SyncViewVersionProperty,
File.Type.PropertyCollection.SYNC_VIEW_VERSION,
ViewMember.getViewVersion()public File.Status getStatus() throws java.io.IOException
Status is determined by comparing the current size and last modified time with that of the last known revision on disk.
java.io.IOException - if an error occurs while reading the local fileFile.Status,
File.getStatus(java.io.File file),
File.getSmartStatus()public File.Status getStatus(java.io.File file) throws java.io.IOException
Status is determined by comparing the current size and last modified time with that of the last known revision on disk.
file - The working file whose status is to be determined.java.io.IOException - if an error occurs while reading the local fileFile.Status,
File.getSmartStatus(java.io.File file)public File.Status getSmartStatus() throws java.io.IOException
Status is determined by comparing the current size and last modified time with that of the last known revision on disk. However, if the working file differs only in modified time, then the equivalent of an "Update Status" is performed. This gives a more accurate status in cases where the file content has not actually changed.
java.io.IOException - if an error occurs while reading the local fileFile.Status,
File.getStatus()public File.Status getSmartStatus(java.io.File file) throws java.io.IOException
Status is determined by comparing the current size and last modified time with that of the last known revision on disk. However, if the working file differs only in modified time, then the equivalent of an "Update Status" is performed. This gives a more accurate status in cases where the file content has not actually changed.
file - The working file whose status is to be determined.java.io.IOException - if an error occurs while reading the local fileFile.Status,
File.getStatus(java.io.File file)public File.Status getStatusNow() throws java.io.IOException
java.io.IOException - if there are any problems reading the local fileFile.Statuspublic File.Status getLastKnownStatus()
public File.Status getStatus(long size, DateTime lastModified)
size - The size of the working file on disk.lastModified - The last modified date of the working file.File.getStatus(),
File.updateStatus(),
File.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime),
File.Statuspublic static boolean isInSyncByTime(java.io.File file,
File.WorkspaceSync syncInfo)
throws java.io.IOException
file - A working file.syncInfo - File synchronization information.java.io.IOExceptionpublic File.Status getStatus(MD5 md5)
md5 - The MD5 signature of the working file, or null if the
signature is unknown or unchanged.File.getStatus(),
File.updateStatus(),
File.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime),
File.Statuspublic static boolean isInSyncByMD5(java.io.File file,
File.WorkspaceSync syncInfo)
throws java.io.IOException
file - A working file.syncInfo - File synchronization information.java.io.IOExceptionpublic long computeCompareMD5(java.io.File workingFile,
MD5 md5)
throws java.io.IOException
Compensates for the effects of expanding keywords and performing end-of-line conversion on checkout.
workingFile - The working file whose MD5 is to be calculated, or null to use
the default working file.md5 - A newly initialized MD5 signature. On output, contains the MD5
signature calculated from the file's content, adjusted as
determined by bUsesKeywords and bConvertEOL.java.io.IOExceptionFile.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime),
File.Statuspublic static File.Keyword[] getBlankKeywords()
File.getUsesKeywords(),
File.Keywordpublic boolean getUsesKeywords()
DisembodiedException - if this File is disembodiedViewMember.isDisembodied()public java.lang.String toString()
public java.lang.String getExtension()
File.Type.ExtensionProperty.NAMEpublic User[] getNotifiedUsers()
getNotifiedUsers in class ItemItem.Type.NotificationIDsProperty.NAMEpublic void addNotifiedUser(User user)
addNotifiedUser in class Itemuser - the user object to add as one to be notifiedpublic void removeNotifiedUser(User user)
removeNotifiedUser in class Itemuser - the user object to remove as one to be notified.public boolean isSyncKnown()
public boolean isWorkingFileAvailable()
File.Type.IsWorkingFileAvailableProperty,
File.Type.PropertyCollection.IS_WORKING_FILE_AVAILABLEpublic boolean isWorkingFileExecutable()
throws java.io.IOException
java.io.IOException - if any file system error occurs.File.Type.IsWorkingFileExecutableProperty,
File.Type.PropertyCollection.IS_WORKING_FILE_EXECUTABLEpublic java.lang.String getWorkingFileName()
throws java.io.IOException
java.io.IOException - if any file system error occurs.File.Type.WorkingFileNameProperty,
File.Type.PropertyCollection.WORKING_FILE_NAMEpublic java.lang.String getWorkingFilePath()
throws java.io.IOException
java.io.IOException - if any file system error occurs.File.Type.WorkingFilePathProperty,
File.Type.PropertyCollection.WORKING_FILE_PATHpublic DateTime getWorkingFileModifiedTime() throws java.io.IOException
java.io.IOExceptionFile.Type.WorkingFileModifiedTimeProperty.NAMEpublic long getWorkingFileSize()
File.Type.WorkingFileSizeProperty,
File.Type.PropertyCollection.WORKING_FILE_SIZEpublic boolean isSyncInRevisionHistory()
For example, if the current revision of this file is "1.5.1.4", then the following revisions would be in the file's linear revision history: "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.5.1.0", "1.5.1.1", "1.5.1.2", "1.5.1.3", "1.5.1.4".
All other revisions would not be in the file's linear revision history..
public int getSyncBranchVersion()
The branch version is the final number in the notation. For example, the branch version of "1.1" is 1; the branch version of "1.2.4.7" is 7.
File.Type.SyncBranchVersionProperty,
File.Type.PropertyCollection.SYNC_BRANCH_VERSIONpublic int getSyncContentVersion()
File.Type.SyncContentVersionProperty,
File.Type.PropertyCollection.SYNC_CONTENT_VERSION,
File.getContentVersion()public long getSyncSize()
File.Type.SyncSizeProperty,
File.Type.PropertyCollection.SYNC_SIZEpublic DateTime getSyncModifiedTime()
File.Type.SyncModifiedTimeProperty.NAMEpublic MD5 getSyncMD5()
File.Type.SyncMD5Property.NAMEpublic void setLocalFileSystemPropertyProvider(LocalFileSystemPropertyProvider provider)
provider - LocalFileSystemPropertyProvider provider, the file property
provider to register for use by this File object.File.getStatus(),
File.getWorkingFileName(),
File.getWorkingFilePath(),
File.getWorkingFileSize(),
File.isWorkingFileExecutable()public LocalFileSystemPropertyProvider getLocalFileSystemPropertyProvider()
File.setLocalFileSystemPropertyProvider(LocalFileSystemPropertyProvider)public static void updateStatus(File[] files, LocalFileSystemPropertyProvider aProvider)
files - the files to be processed for changed attributes.aProvider - the LocalFileSystemPropertyProvider whose status needs
updatingpublic RollbackSession rollback() throws java.io.IOException
java.io.IOExceptionStarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.