package saker.build.file.path
Interface for providing listing functionality for wildcard paths.
TThe object type the lister discovers.
public static ItemLister< | Creates an ItemLister for a given file provider. |
public static ItemLister< | forFileProvider( Creates an ItemLister for a given file provider. |
public static ItemLister< | forFileProviderWithoutRoots( Creates an ItemLister for a given file provider, but without any root directories. |
public static ItemLister< | forSakerFiles( Creates an ItemLister for collecting SakerFiles with the given root directories. |
public static ItemLister< | forSakerFiles( Creates an ItemLister for collecting SakerFiles with the given root directories and
working directory. |
public static ItemLister< | forSakerFiles( Creates an ItemLister for collecting SakerFiles in the specified working directory. |
public static ItemLister< | forSakerFiles( Creates an ItemLister for collecting SakerFiles for a task. |
public T | Gets the item at the given absolute path. |
public T | getRootItem( Gets the root item for the specified root item name. |
public Set< | Gets the names of the root items. |
public T | Gets the working item for finding items with a relative path. |
public SakerPath | The path of the working item. |
public Map< | listChildItems( Lists all child items for a given parent. |
public NavigableMap< | listChildItemsRecursively( Lists all child items for a given parent, recursively. |
public T | Resolves a child item for a given parent. |
public static ItemLister<? extends BasicFileAttributes> forFileProvider(SakerFileProvider fp) throws NullPointerException
Creates an ItemLister for a given file provider.
The created item lister will collect the file attributes of the files.
No working directory is used.
fpThe file provider.
The created item lister.
NullPointerExceptionIf the file provider is
null
.public static ItemLister<? extends BasicFileAttributes> forFileProvider(SakerFileProvider fp, SakerPath workingdir) throws NullPointerException
Creates an ItemLister for a given file provider.
The created item lister will collect the file attributes of the files.
fpThe file provider.
workingdirThe working directory, or
null
to not use one.The created item lister.
NullPointerExceptionIf the file provider is
null
.public static ItemLister<? extends BasicFileAttributes> forFileProviderWithoutRoots(SakerFileProvider fp, SakerPath workingdir) throws NullPointerException
Creates an ItemLister for a given file provider, but without any root directories.
The item lister will not use the root directories of the specified file provider, only the working directory.
The created item lister will collect the file attributes of the files.
fpThe file provider.
workingdirThe working directory.
The created item lister.
NullPointerExceptionIf any of the arguments are
null
.saker.build 0.8.5
public static ItemLister<? extends SakerFile> forSakerFiles(SakerDirectory workingdirectory) throws NullPointerException
Creates an ItemLister for collecting SakerFiles in the specified working directory.
No root directories are used.
workingdirectoryThe working directory.
The created item lister.
NullPointerExceptionIf the argument is
null
.saker.build 0.8.5
Creates an ItemLister for collecting SakerFiles for a task.
The task working directory is used to resolve relative paths.
taskcontextThe task context.
The created item lister.
Gets the item at the given absolute path.
pathThe absolute path to resolve the item at.
The item or
null
if not found.Gets the root item for the specified root item name.
The parameter root item name is one of the names returned by getRootItems().
nameThe root item name.
The root item, or
null
if not found.Gets the names of the root items.
Root item names follow the rules of SakerPath root names.
An unmodifiable set of root items.
Gets the working item for finding items with a relative path.
The working item, or
null
if not available.The path of the working item.
The path to the working item or
null
if there's no working item.Lists all child items for a given parent.
itemThe parent item.
An map of child items.
Lists all child items for a given parent, recursively.
All child items and their children should be inclided in the returned map. The result map keys should be relative to the parent item.
itemThe parent item.
The recursively listed child items.