CREATE FILE¶
Creates a new text file with the given content in the d3VIEW temporary directory, sanitizing the filename to prevent directory traversal. Use this worker whenever a downstream step needs a file artifact generated from inline or computed text content.
When to use¶
Tagged: file, file_create, sanitize, temporary_directory, text, tmp, write.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Content | content | textarea | — | ✓ | Full text content to write into the file; supports any plain-text format (e.g. CSV, JSON, keyword deck) and is exposed as a code editor in the UI. |
| Filename | filename | text | — | ✓ | Target filename (no path components) for the new file in the temporary directory; path separators are stripped automatically to prevent directory traversal. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| File | file | file | File artifact pointing to the newly written file in the temporary directory; pass this directly to downstream file-consuming workers. |
| Filename | filename | string | Sanitized filename (basename only) of the file that was written, after any directory-traversal characters have been removed. |
| Bytes Written | bytes_written | number | Integer count of bytes written to the file; useful for validating that content was not empty and the write succeeded. |
| Status | status | string | Human-readable status message confirming success and echoing the byte count and filename, or describing the failure reason. |
| File Path | file_path | text | Absolute filesystem path to the written file within the temporary directory; use when a downstream worker requires an explicit path string rather than a file object. |
Disciplines¶
- data.io.file
Auto-generated from platform schema. Worker id: file_create. Schema hash: 2af6f35d65f7. Hand-curated docs in workerexamples/ override this page when present.