# FileContents: Nextcloud Nextcloud File Contents ## Documentation Content and metadata of one file, by its path. The content is always read alongside the metadata, whichever columns are selected. Insert creates a file (or a folder with is_folder), update overwrites a file with file_contents or moves a file or folder with path, and delete removes it. - Catalog: `Nextcloud` - Schema: `Nextcloud` - Primary Keys: `path` - Label: Nextcloud File Contents Can retrieve data and change data using insert, update and delete. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `FileContents`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values. Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three. Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third. | Name | Data Type | Required | Default Value | Documentation | |---|:---:|:---:|:---:|---| | `path` | `varchar2` | ☐ | | File to read, relative to the connected account's own root. | ## Columns of Table Function The columns of the table function `FileContents` are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert and update. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `content_type` | `varchar2` | | ☐ | MIME type; empty for a folder. | | `etag` | `varchar2` | | ☐ | Entity tag: the version Nextcloud gives this file, changing whenever its content changes. | | `file_contents` | `blob` | | ☐ | Content of the file. Empty for a folder. | | `file_id` | `int64` | | ☐ | Identifier stable across a rename or move. | | `has_preview` | `char` | | ☐ | Whether the server can generate a thumbnail for the entry. | | `is_folder` | `char` | | ☐ | Whether the entry is a folder rather than a file. | | `last_modified` | `datetime` | | ☐ | Moment last modified. | | `owner_id` | `varchar2` | | ☐ | Login name of the entry's owner. | | `path` | `varchar2` | | ☑ | Path relative to the connected account's own root. | | `permissions` | `varchar2` | | ☐ | Permission letters the connected account has on the entry. | | `size_bytes` | `int64` | | ☐ | Size in bytes; empty for a folder. |