Package org.eclipse.team.core.history.provider

# Class FileRevision

java.lang.Object
org.eclipse.team.core.history.provider.FileRevision

All Implemented Interfaces:
  `IFileRevision`

public abstract class FileRevision extends Object implements IFileRevision
Abstract implementation of `IFileRevision` that can be implemented by clients.

Since:
  3.2
See Also:
  - `IFileRevision`

## Constructor Summary

Constructors
Constructor
Description
`FileRevision()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`exists()`
Returns whether the file represented by this state exists.
`String`
`getAuthor()`
Returns the author of this revision or `null` if this information is not available.
`ITag[]`
`getBranches()`
Returns the branches names of file revision.
`String`
`getComment()`
Returns the comment for this file revision or `null` if this information is not available.
`String`
`getContentIdentifier()`
Returns the unique identifier for this file revision or `null` if one is not available.
`static IFileRevision`
`getFileRevisionFor(IFile file)`
Deprecated.
This method doesn't do anything useful so it has been deprecated.
`ITag[]`
`getTags()`
Returns the set of tags available for this file revision.
`long`
`getTimestamp()`
Returns the time stamp of this revision as a long or `-1` if the timestamp is unknown.
`URI`
`getURI()`
Returns the URI of the file to which this state is associated or `null` if the file does not have a URI.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.team.core.history.IFileRevision

`getName, getStorage, isPropertyMissing, withAllProperties`

## Constructor Details

### FileRevision

public FileRevision()

## Method Details

### getFileRevisionFor

@Deprecated public static IFileRevision getFileRevisionFor(IFile file)
Deprecated.
This method doesn't do anything useful so it has been deprecated.
Return a file state representing the current state of the local file.

Parameters:
  `file` - a local file
Returns:
  a file state representing the current state of the local file

### getURI

public URI getURI()
Description copied from interface: `IFileRevision`
Returns the URI of the file to which this state is associated or `null` if the file does not have a URI.

Specified by:
  `getURI` in interface `IFileRevision`
Returns:
  URI of the file to which this state is associated

### getTimestamp

public long getTimestamp()
Description copied from interface: `IFileRevision`
Returns the time stamp of this revision as a long or `-1` if the timestamp is unknown.

Specified by:
  `getTimestamp` in interface `IFileRevision`
Returns:
  a long that represents the time of this revision as the number of milliseconds since the base time
See Also:
  - `System.currentTimeMillis()`

### exists

public boolean exists()
Description copied from interface: `IFileRevision`
Returns whether the file represented by this state exists.

Specified by:
  `exists` in interface `IFileRevision`
Returns:
  whether the file represented by this state exists

### getContentIdentifier

public String getContentIdentifier()
Description copied from interface: `IFileRevision`
Returns the unique identifier for this file revision or `null` if one is not available. If `null` is returned, clients can use the timestamp to differentiate revisions.

Specified by:
  `getContentIdentifier` in interface `IFileRevision`
Returns:
  the unique identifier for this file revision or `null`

### getAuthor

public String getAuthor()
Description copied from interface: `IFileRevision`
Returns the author of this revision or `null` if this information is not available.

Specified by:
  `getAuthor` in interface `IFileRevision`
Returns:
  the author of this revision or `null`

### getComment

public String getComment()
Description copied from interface: `IFileRevision`
Returns the comment for this file revision or `null` if this information is not available.

Specified by:
  `getComment` in interface `IFileRevision`
Returns:
  the comment for this file revision or `null`

### getBranches

public ITag[] getBranches()
Returns the branches names of file revision.

Specified by:
  `getBranches` in interface `IFileRevision`
Returns:
  an array of ITag's if branch names exist for this revision or an empty ITag array if no names exist
Since:
  3.6

### getTags

public ITag[] getTags()
Description copied from interface: `IFileRevision`
Returns the set of tags available for this file revision.

Specified by:
  `getTags` in interface `IFileRevision`
Returns:
  an array of ITag's if ITags exist for this revision or an empty ITag array if no tags exist