public static class FileTreeIterator.FileEntry extends WorkingTreeIterator.Entry
| Constructor and Description |
|---|
FileTreeIterator.FileEntry(File f,
FS fs)
Create a new file entry.
|
| Modifier and Type | Method and Description |
|---|---|
File |
getFile()
Get the underlying file of this entry.
|
long |
getLastModified()
Get the last modified time of this entry.
|
long |
getLength()
Get the byte length of this entry.
|
FileMode |
getMode()
Get the type of this entry.
|
String |
getName()
Get the name of this entry within its directory.
|
InputStream |
openInputStream()
Obtain an input stream to read the file content.
|
toStringpublic FileMode getMode()
WorkingTreeIterator.EntryNote: Efficient implementation required.
The implementation of this method must be efficient. If a subclass needs to compute the value they should cache the reference within an instance member instead.
getMode in class WorkingTreeIterator.EntryFileMode.public String getName()
WorkingTreeIterator.EntryEfficient implementations are not required. The caller will obtain the name only once and cache it once obtained.
getName in class WorkingTreeIterator.Entrypublic long getLength()
WorkingTreeIterator.EntryNote: Efficient implementation required.
The implementation of this method must be efficient. If a subclass needs to compute the value they should cache the reference within an instance member instead.
getLength in class WorkingTreeIterator.Entrypublic long getLastModified()
WorkingTreeIterator.EntryNote: Efficient implementation required.
The implementation of this method must be efficient. If a subclass needs to compute the value they should cache the reference within an instance member instead.
getLastModified in class WorkingTreeIterator.Entrypublic InputStream openInputStream() throws IOException
WorkingTreeIterator.EntryEfficient implementations are not required. The caller will usually obtain the stream only once per entry, if at all.
The input stream should not use buffering if the implementation can avoid it. The caller will buffer as necessary to perform efficient block IO operations.
The caller will close the stream once complete.
openInputStream in class WorkingTreeIterator.EntryIOException - the file could not be opened for reading.public File getFile()
Copyright © 2014. All rights reserved.