public class RecursiveDirectoryStream
extends stream.io.multi.AbstractMultiStream
For example:
finds all files below (recursively) /some/folder with their names matching the pattern. See unix globs for more information on pattern syntax
Created by mackaiver on 12/15/15.
| Modifier and Type | Field and Description |
|---|---|
BlockingQueue<Path> |
files |
int |
maxDepth |
String |
pattern |
boolean |
skipErrors |
activate, activeWrapper, additionOrder, streams| Constructor and Description |
|---|
RecursiveDirectoryStream(stream.io.SourceURL url) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
init() |
stream.Data |
readNext() |
addStream, getActivate, getStreams, setActivategetId, getInputStream, getLimit, getPrefix, getSequenceKey, getUrl, read, setId, setLimit, setPrefix, setSequenceKey, setUrlpublic BlockingQueue<Path> files
@Parameter(required=false,
description="Maximum depth of folders to traverse",
defaultValue="6")
public int maxDepth
@Parameter(required=true,
description="The pattern to filter files by. Understands usual glob syntax")
public String pattern
@Parameter(required=false,
description="If false the reading of a broken file throws an exception and the process is aborted, if true the next file will be processed",
defaultValue="true")
public boolean skipErrors
public RecursiveDirectoryStream(stream.io.SourceURL url)
public void init()
throws Exception
init in interface stream.io.Sourceinit in class stream.io.multi.AbstractMultiStreamExceptionpublic stream.Data readNext()
throws Exception
readNext in class stream.io.AbstractStreamExceptionCopyright © 2019. All rights reserved.