public class FileTreeDataViews
extends java.lang.Object
FileTreeDataView
.Modifier and Type | Class and Description |
---|---|
static interface |
FileTreeDataViews.CacheObserver<T>
Provides callbacks to run when different types of file events are detected by the cache.
|
static interface |
FileTreeDataViews.Converter<R>
Converts a Path into an arbitrary value to be cached.
|
static interface |
FileTreeDataViews.Entry<T>
Container class for
CachedDirectoryImpl entries. |
static interface |
FileTreeDataViews.ObservableCache<T>
A file tree cache that can be monitored for events.
|
Modifier and Type | Method and Description |
---|---|
static <T> DirectoryDataView<T> |
cached(java.nio.file.Path path,
FileTreeDataViews.Converter<T> converter,
int depth,
boolean followLinks)
Make a new
DirectoryView that caches the file tree but has no data value associated
with each value. |
public static <T> DirectoryDataView<T> cached(java.nio.file.Path path, FileTreeDataViews.Converter<T> converter, int depth, boolean followLinks) throws java.io.IOException
DirectoryView
that caches the file tree but has no data value associated
with each value.T
- the data type for this viewpath
- the path to monitorconverter
- computes the data value for each path found in the directorydepth
- sets how the limit for how deep to traverse the children of this directoryfollowLinks
- sets whether or not to treat symbolic links whose targets as directories or
filesjava.io.IOException
- when an error is encountered traversing the directory.