read_file
read_file function
Type: Function · Category: popular
Read a file into a string.
| Argument | Type | Description |
|---|---|---|
length |
int | Max length of the file to read. |
offset |
int64 | Where to read from the file. |
filename |
accessors.OSPath (required) | One or more files to open. |
accessor |
string | An accessor to use. |
Required permissions: FILESYSTEM_READ
Platforms: macOS, Linux, Windows
Source: vql/filesystem/filesystem.go
read_file plugin
Type: Plugin · Category: popular
Read files in chunks.
This plugin reads a file in chunks and returns each chunks as a separate row.
It is useful when we want to report file contents for small files like configuration files etc.
The returned row contains the following columns: data, offset, filename
| Argument | Type | Description |
|---|---|---|
chunk |
int | length of each chunk to read from the file. |
max_length |
int | Max length of the file to read. |
filenames |
list of accessors.OSPath (required) | One or more files to open. |
accessor |
string | An accessor to use. |
Required permissions: FILESYSTEM_READ
Platforms: macOS, Linux, Windows
Source: vql/filesystem/filesystem.go