org.eclipse.jgit.lib
Class GitIndex.Entry

java.lang.Object
  extended by org.eclipse.jgit.lib.GitIndex.Entry
Enclosing class:
GitIndex

Deprecated. Use DirCacheEntry.

@Deprecated
public class GitIndex.Entry
extends Object

An index entry


Method Summary
 int getModeBits()
          Deprecated. Return raw file mode bits.
 String getName()
          Deprecated.  
 byte[] getNameUTF8()
          Deprecated.  
 ObjectId getObjectId()
          Deprecated.  
 int getSize()
          Deprecated.  
 int getStage()
          Deprecated.  
 int getStages()
          Deprecated. Returns the stages in which the entry's file is recorded in the index.
 boolean isAssumedValid()
          Deprecated.  
 boolean isModified(File wd)
          Deprecated. Check if an entry's content is different from the cache, File status information is used and status is same we consider the file identical to the state in the working directory.
 boolean isModified(File wd, boolean forceContentCheck)
          Deprecated. Check if an entry's content is different from the cache, File status information is used and status is same we consider the file identical to the state in the working directory.
 boolean isUpdateNeeded()
          Deprecated.  
 void setAssumeValid(boolean assumeValid)
          Deprecated. Set whether to always assume this entry valid
 void setUpdateNeeded(boolean updateNeeded)
          Deprecated. Set whether this entry must be checked
 String toString()
          Deprecated.  
 boolean update(File f)
          Deprecated. Update this index entry with stat and SHA-1 information if it looks like the file has been modified in the workdir.
 boolean update(File f, byte[] newContent)
          Deprecated. Update this index entry with stat and SHA-1 information if it looks like the file has been modified in the workdir.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

update

public boolean update(File f)
               throws IOException
Deprecated. 
Update this index entry with stat and SHA-1 information if it looks like the file has been modified in the workdir.

Parameters:
f - file in work dir
Returns:
true if a change occurred
Throws:
IOException

update

public boolean update(File f,
                      byte[] newContent)
               throws IOException
Deprecated. 
Update this index entry with stat and SHA-1 information if it looks like the file has been modified in the workdir.

Parameters:
f - file in work dir
newContent - the new content of the file
Returns:
true if a change occurred
Throws:
IOException

isModified

public boolean isModified(File wd)
Deprecated. 
Check if an entry's content is different from the cache, File status information is used and status is same we consider the file identical to the state in the working directory. Native git uses more stat fields than we have accessible in Java.

Parameters:
wd - working directory to compare content with
Returns:
true if content is most likely different.

isModified

public boolean isModified(File wd,
                          boolean forceContentCheck)
Deprecated. 
Check if an entry's content is different from the cache, File status information is used and status is same we consider the file identical to the state in the working directory. Native git uses more stat fields than we have accessible in Java.

Parameters:
wd - working directory to compare content with
forceContentCheck - True if the actual file content should be checked if modification time differs.
Returns:
true if content is most likely different.

getStages

public int getStages()
Deprecated. 
Returns the stages in which the entry's file is recorded in the index. The stages are bit-encoded: bit N is set if the file is present in stage N. In particular, the N-th bit will be set if this entry itself is in stage N (see getStage()).

Returns:
flags denoting stages
See Also:
getStage()

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object

getName

public String getName()
Deprecated. 
Returns:
path name for this entry

getNameUTF8

public byte[] getNameUTF8()
Deprecated. 
Returns:
path name for this entry as byte array, hopefully UTF-8 encoded

getObjectId

public ObjectId getObjectId()
Deprecated. 
Returns:
SHA-1 of the entry managed by this index

getStage

public int getStage()
Deprecated. 
Returns:
the stage this entry is in

getSize

public int getSize()
Deprecated. 
Returns:
size of disk object

isAssumedValid

public boolean isAssumedValid()
Deprecated. 
Returns:
true if this entry shall be assumed valid

isUpdateNeeded

public boolean isUpdateNeeded()
Deprecated. 
Returns:
true if this entry should be checked for changes

setAssumeValid

public void setAssumeValid(boolean assumeValid)
Deprecated. 
Set whether to always assume this entry valid

Parameters:
assumeValid - true to ignore changes

setUpdateNeeded

public void setUpdateNeeded(boolean updateNeeded)
Deprecated. 
Set whether this entry must be checked

Parameters:
updateNeeded -

getModeBits

public int getModeBits()
Deprecated. 
Return raw file mode bits. See FileMode

Returns:
file mode bits


Copyright © 2011. All Rights Reserved.