Package org.eclipse.jgit.util
Class FS.Attributes
- java.lang.Object
-
- org.eclipse.jgit.util.FS.Attributes
-
- Enclosing class:
- FS
public static class FS.Attributes extends java.lang.Object
File attributes we typically care for.- Since:
- 3.3
-
-
Field Summary
Fields Modifier and Type Field Description protected long
length
file length
-
Constructor Summary
Constructors Constructor Description Attributes(java.io.File path, FS fs)
Constructor when there are issues with reading
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCreationTime()
java.io.File
getFile()
long
getLastModifiedTime()
long
getLength()
java.lang.String
getName()
boolean
isDirectory()
boolean
isExecutable()
boolean
isRegularFile()
boolean
isSymbolicLink()
-
-
-
Constructor Detail
-
Attributes
public Attributes(java.io.File path, FS fs)
Constructor when there are issues with reading- Parameters:
fs
-path
-
-
-
Method Detail
-
isDirectory
public boolean isDirectory()
- Returns:
- true if this are the attributes of a directory
-
isExecutable
public boolean isExecutable()
- Returns:
- true if this are the attributes of an executable file
-
isSymbolicLink
public boolean isSymbolicLink()
- Returns:
- true if this are the attributes of a symbolic link
-
isRegularFile
public boolean isRegularFile()
- Returns:
- true if this are the attributes of a regular file
-
getCreationTime
public long getCreationTime()
- Returns:
- the time when the file was created
-
getLastModifiedTime
public long getLastModifiedTime()
- Returns:
- the time (milliseconds since 1970-01-01) when this object was last modified
-
getLength
public long getLength()
- Returns:
- length of this file object
-
getName
public java.lang.String getName()
- Returns:
- the filename
-
getFile
public java.io.File getFile()
- Returns:
- the file the attributes apply to
-
-