blob: 4ddedb0451b7f4b67688626508854867b7ac28d3 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>GetFile</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">GetFile</h1><h2>Description: </h2><p>Creates FlowFiles from files in a directory. NiFi will ignore files it doesn't have at least read permissions for.</p><h3>Tags: </h3><p>local, files, filesystem, ingest, ingress, get, source, input</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the <a href="../../../../../html/expression-language-guide.html">NiFi Expression Language</a>.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>Input Directory</strong></td><td>Input Directory</td><td></td><td id="allowable-values"></td><td id="description">The input directory from which to pull files<br/><strong>Supports Expression Language: true (will be evaluated using variable registry only)</strong></td></tr><tr><td id="name"><strong>File Filter</strong></td><td>File Filter</td><td id="default-value">[^\.].*</td><td id="allowable-values"></td><td id="description">Only files whose names match the given regular expression will be picked up</td></tr><tr><td id="name">Path Filter</td><td>Path Filter</td><td></td><td id="allowable-values"></td><td id="description">When Recurse Subdirectories is true, then only subdirectories whose path matches the given regular expression will be scanned</td></tr><tr><td id="name"><strong>Batch Size</strong></td><td>Batch Size</td><td id="default-value">10</td><td id="allowable-values"></td><td id="description">The maximum number of files to pull in each iteration</td></tr><tr><td id="name"><strong>Keep Source File</strong></td><td>Keep Source File</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">If true, the file is not deleted after it has been copied to the Content Repository; this causes the file to be picked up continually and is useful for testing purposes. If not keeping original NiFi will need write permissions on the directory it is pulling from otherwise it will ignore the file.</td></tr><tr><td id="name"><strong>Recurse Subdirectories</strong></td><td>Recurse Subdirectories</td><td id="default-value">true</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Indicates whether or not to pull files from subdirectories</td></tr><tr><td id="name"><strong>Polling Interval</strong></td><td>Polling Interval</td><td id="default-value">0 sec</td><td id="allowable-values"></td><td id="description">Indicates how long to wait before performing a directory listing</td></tr><tr><td id="name"><strong>Ignore Hidden Files</strong></td><td>Ignore Hidden Files</td><td id="default-value">true</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Indicates whether or not hidden files should be ignored</td></tr><tr><td id="name"><strong>Minimum File Age</strong></td><td>Minimum File Age</td><td id="default-value">0 sec</td><td id="allowable-values"></td><td id="description">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</td></tr><tr><td id="name">Maximum File Age</td><td>Maximum File Age</td><td></td><td id="allowable-values"></td><td id="description">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</td></tr><tr><td id="name"><strong>Minimum File Size</strong></td><td>Minimum File Size</td><td id="default-value">0 B</td><td id="allowable-values"></td><td id="description">The minimum size that a file must be in order to be pulled</td></tr><tr><td id="name">Maximum File Size</td><td>Maximum File Size</td><td></td><td id="allowable-values"></td><td id="description">The maximum size that a file can be in order to be pulled</td></tr></table><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>success</td><td>All files are routed to success</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>filename</td><td>The filename is set to the name of the file on disk</td></tr><tr><td>path</td><td>The path is set to the relative path of the file's directory on disk. For example, if the &lt;Input Directory&gt; property is set to /tmp, files picked up from /tmp will have the path attribute set to ./. If the &lt;Recurse Subdirectories&gt; 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</td></tr><tr><td>file.creationTime</td><td>The date and time that the file was created. May not work on all file systems</td></tr><tr><td>file.lastModifiedTime</td><td>The date and time that the file was last modified. May not work on all file systems</td></tr><tr><td>file.lastAccessTime</td><td>The date and time that the file was last accessed. May not work on all file systems</td></tr><tr><td>file.owner</td><td>The owner of the file. May not work on all file systems</td></tr><tr><td>file.group</td><td>The group owner of the file. May not work on all file systems</td></tr><tr><td>file.permissions</td><td>The read/write/execute permissions of the file. May not work on all file systems</td></tr><tr><td>absolute.path</td><td>The full/absolute path from where a file was picked up. The current 'path' attribute is still populated, but may be a relative path</td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3><table id="restrictions"><tr><th>Required Permission</th><th>Explanation</th></tr><tr><td>read filesystem</td><td>Provides operator the ability to read from any file that NiFi has access to.</td></tr><tr><td>write filesystem</td><td>Provides operator the ability to delete any file that NiFi has access to.</td></tr></table><h3>Input requirement: </h3>This component does not allow an incoming relationship.<h3>System Resource Considerations:</h3>None specified.<h3>See Also:</h3><p><a href="../org.apache.nifi.processors.standard.PutFile/index.html">PutFile</a>, <a href="../org.apache.nifi.processors.standard.FetchFile/index.html">FetchFile</a></p></body></html>