Create a New File
litewrite_create_fileCreates a new text file or directory in a Litewrite project. Specify the project, name, type, and optionally a parent folder and initial content.
Instructions
Create a new text file (or directory) in a Litewrite project (POST /api/internal/files/create).
Args:
projectId (string, required): The project id.
name (string, required): Name of the new file or folder, e.g. "notes.md".
type (string, required): "file" or "directory".
parentPath (string, optional): Parent directory relative to project root, e.g. "chapters".
content (string, optional): Initial text content for a file.
Returns a confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the new file or folder | |
| type | Yes | 'file' or 'directory' | |
| content | No | Initial text content for a file | |
| projectId | Yes | The Litewrite project id | |
| parentPath | No | Parent directory, e.g. 'chapters' |