|
ddiff Version 1.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ehsbe.ddiff.DirEntry
public class DirEntry extends Object
A simple caching container for file information.
Modifier and Type | Class and Description |
---|---|
static class |
DirEntry.Type
types of file, we distignuish. |
Modifier and Type | Field and Description |
---|---|
java.nio.file.attribute.BasicFileAttributes |
attr
the file attributes for this instance. |
java.nio.file.Path |
opath
the original path associated with this entry. |
java.nio.file.Path |
path
the path associated with this entry. |
Constructor and Description |
---|
DirEntry(java.nio.file.Path path,
boolean resolve,
java.nio.file.attribute.BasicFileAttributes attrs)
Create a new instance. |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Get the basename of this entry in the original directory. |
DirEntry.Type |
getType()
Get the type of the entry. |
static DirEntry.Type |
getType(java.nio.file.Path path,
java.nio.file.attribute.BasicFileAttributes attributes)
Get the type of an dir entry depending on its file attributes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.nio.file.Path path
public final java.nio.file.Path opath
path
if this is not
a symlink
public final java.nio.file.attribute.BasicFileAttributes attr
null
.
Constructor Detail |
---|
public DirEntry(java.nio.file.Path path, boolean resolve, java.nio.file.attribute.BasicFileAttributes attrs)
path
- path associated with this instance.resolve
- if true
resolve the path to its final destination, if it is
a symlink.attrs
- file attributes for this instance. Might be null
.Method Detail |
---|
public String getName()
public DirEntry.Type getType()
null
.public static DirEntry.Type getType(java.nio.file.Path path, java.nio.file.attribute.BasicFileAttributes attributes)
path
- the path to analyzeattributes
- file attributes to use. If null
, attributes are retrieved
on the fly.null
.
|
ddiff Version 1.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |