file · Command reference
qzx deleteFile
What it does
Previews or deletes a file or directory from the filesystem
Canonical command: deleteFile
Accepted aliases: None
Case-sensitive: no
Included in the published package
Available in PyPI 0.2.2.0.2. This page documents the 0.2.2.0.2 alpha development checkout.
Safety and effects
Can mutate state
Documented dry-run parameter
No native program invocation in the current classification
No documented network use
Outcome may depend on permissions
Preview-only by default. Applying a deletion creates a fail-closed safety archive first. --dangerously-bypass-approvals-and-sandbox/--yolo executes while explicitly skipping that archive. Filesystem roots are always protected.
Before mutation, QZX creates a recovery archive; --dangerously-bypass-approvals-and-sandbox/--yolo explicitly skips it.
This safety classification was reviewed against implementation digest sha256:cbb0714a6c9eb9fd25d000299c9e694fe761c2c9e74d1b8726de4bbb64ba6b07 on 2026-07-24.
Exact syntax
qzx deleteFile <target> [recursive] [force] [dry_run] [apply] [allow_unsafe] --jsonParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| target | str | Yes | Not declared | Path to the file, symlink, or directory |
| recursive | bool | No | false | Use true/-r for all descendants or a positive integer for limited depth |
| force | bool | No | false | Continue a limited-depth deletion after individual errors |
| dry_run | bool | No | true | Preview the operation without deleting anything |
| apply | bool | No | false | Explicitly authorize deletion; required together with dry_run=false |
| allow_unsafe | bool | No | false | Allow deleting protected locations such as the current or home directory |
Input examples
qzx deleteFile myfile.txtPreview deletion of a file (default behavior)
qzx deleteFile mydir --recursive truePreview recursive deletion of a directory
qzx deleteFile mydir --recursive true --dry_run false --applyBack up and delete a directory and all descendants
For the complete structured payload, add --json: qzx deleteFile <target> [recursive] [force] [dry_run] [apply] [allow_unsafe] --json
Representative output example
This illustrative JSON is derived from the current implementation-backed result contract. It shows what the command can return without claiming a recorded execution; values vary with inputs, host, permissions, and optional tools.
Example command: qzx deleteFile myfile.txt --json
{
"success": true,
"message": "Previews or deletes a file or directory from the filesystem. In this illustrative example, the command completed successfully.",
"details": {
"dry_run_mode": true
}
}View the JSON result contract
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"success",
"message"
],
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
},
"details": {
"oneOf": [
{
"type": "object",
"properties": {
"dry_run_mode": {
"type": "boolean"
}
},
"additionalProperties": true
},
{
"type": "object",
"properties": {
"errors": []
},
"additionalProperties": true
}
]
},
"error": {
"type": "string"
},
"error_code": {
"type": "string"
}
},
"additionalProperties": true
}Errors and limits
The public contract requires success=false and a descriptive message on failure. This catalog does not yet declare a command-specific error taxonomy; inspect the result and do not invent error codes.
QZX is alpha software. Optional dependencies, permissions, and host capabilities can change the result.
Evidence workflow: requires a controlled privileged environment.
Evidence and provenance
- Implementation
- src/qzx/commands/file/delete_file.py
- Tests
- No command-specific test file with the same module name was found; this does not prove that all coverage is absent.
- Documentation channel
- Development documentation 0.2.2.0.2 · main · sha256:319b16857a87636ebc3b89734cc040a737bb56194464fca33ce73bdae2043096
- Availability
- 0.2.2.0.2 or earlier
Keep exploring
Related commands
These commands also belong to the file category. Compare them to choose the operation that best fits your task.
qzx decompressZipExtracts all files from a ZIP archive to a destination folder, safely and securelyqzx detectFileTypeIdentifies file type based on its magic number (file signature) rather than extensionqzx createDirectoryCreates one or more directories at specified pathsqzx downloadFileDownloads a file from the Internet (similar to 'wget' or 'curl' in Unix)