github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/inputs/files.md (about) 1 --- 2 title: files 3 type: input 4 status: deprecated 5 categories: ["Local"] 6 --- 7 8 <!-- 9 THIS FILE IS AUTOGENERATED! 10 11 To make changes please edit the contents of: 12 lib/input/files.go 13 --> 14 15 import Tabs from '@theme/Tabs'; 16 import TabItem from '@theme/TabItem'; 17 18 :::warning DEPRECATED 19 This component is deprecated and will be removed in the next major version release. Please consider moving onto [alternative components](#alternatives). 20 ::: 21 22 Reads files from a path, where each discrete file will be consumed as a single 23 message. 24 25 ```yaml 26 # Config fields, showing default values 27 input: 28 label: "" 29 files: 30 path: "" 31 delete_files: false 32 ``` 33 34 The path can either point to a single file (resulting in only a single message) 35 or a directory, in which case the directory will be walked and each file found 36 will become a message. 37 38 ## Alternatives 39 40 The behaviour of this input is now covered by the [`file` input](/docs/components/inputs/file). 41 42 ### Metadata 43 44 This input adds the following metadata fields to each message: 45 46 ``` text 47 - path 48 ``` 49 50 You can access these metadata fields using 51 [function interpolation](/docs/configuration/interpolation#metadata). 52 53 ## Fields 54 55 ### `path` 56 57 A path to either a directory or a file. 58 59 60 Type: `string` 61 Default: `""` 62 63 ### `delete_files` 64 65 Whether to delete files once they are consumed. 66 67 68 Type: `bool` 69 Default: `false` 70 71