Description:

Retrieves a listing of files from the local filesystem. For each file that is listed, creates a FlowFile that represents the file so that it can be fetched in conjunction with ListFile. This Processor is designed to run on Primary Node only in a cluster. If the primary node changes, the new Primary Node will pick up where the previous node left off without duplicating all of the data. Unlike GetFile, this Processor does not delete any data from the local filesystem.

Tags:

file, get, list, ingest, source, filesystem

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the Expression Language Guide.

Name Default Value Allowable Values Description
Input Directory The input directory from which files to pull files
Supports Expression Language: true
Recurse Subdirectories true * true</br> * false Indicates whether to list files from subdirectories of the directory
Input Directory Location Local *Local</br> * Remote Specifies where the Input Directory is located. This is used to determine whether state should be stored locally or across the cluster.
File Filter [^\.].* Only files whose names match the given regular expression will be picked up
Path Filter When Recurse Subdirectories is true, then only subdirectories whose path matches the given regular expression will be scanned
Minimum File Age 0 sec The minimum age that a file must be in order to be pulled; any file younger than this amount of time (according to last modification date) will be ignored
Maximum File Age The maximum age that a file must be in order to be pulled; any file older than this amount of time (according to last modification date) will be ignored
Minimum File Size 0 B The minimum size that a file must be in order to be pulled
Maximum File Size The maximum size that a file can be in order to be pulled
Ignore Hidden Files true * true</br> * false Indicates whether or not hidden files should be ignored

Relationships:

Name Description
success All FlowFiles that are received are routed to success

Reads Attributes:

None specified.

Writes Attributes:

Name Description
filename The name of the file that was read from filesystem.
path The path is set to the relative path of the file's directory on filesystem compared to the Input Directory property. For example, if Input Directory is set to /tmp, then files picked up from /tmp will have the path attribute set to "/". If the Recurse Subdirectories property is set to true and a file is picked up from /tmp/abc/1/2/3, then the path attribute will be set to "abc/1/2/3/".
absolute.path The absolute.path is set to the absolute path of the file's directory on filesystem. For example, if the Input Directory property is set to /tmp, then files picked up from /tmp will have the path attribute set to "/tmp/". If the Recurse Subdirectories property is set to true and a file is picked up from /tmp/abc/1/2/3, then the path attribute will be set to "/tmp/abc/1/2/3/".
fs.owner The user that owns the file in filesystem
fs.group The group that owns the file in filesystem
fs.lastModified The timestamp of when the file in filesystem was last modified, as milliseconds since midnight Jan 1, 1970 UTC
fs.length The number of bytes in the file in filesystem
fs.permissions The permissions for the file in filesystem. This is formatted as 3 characters for the owner, 3 for the group, and 3 for other users. For example rw-rw-r--

See Also:

GetFile,PutFile,FetchFile