← All procedures
fs.move
Move or rename file/directory
CLI- Package
- @procedures/fs · README
- Path
["fs","move"]- CLI
mark fs move --src <string> --dest <string>- As data
{"$proc":["fs","move"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/fs"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["fs","move"], { src: "<src>", dest: "<dest>" });
console.log(JSON.stringify(result));From the command line
$ mark fs move --src <string> --dest <string>
As data, in a program
{
"$proc": ["fs", "move"],
"input": { "src": "<src>", "dest": "<dest>" }
}Input
| Field | Type | Required | Default | Description |
|---|
src | string | yes | | Source path |
dest | string | yes | | Destination path |
overwrite | boolean | no | false | Overwrite existing files (default: false) |
Output
| Field | Type | Required | Default | Description |
|---|
src | string | yes | | The old path |
dest | string | yes | | The new path |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"src": {
"type": "string",
"description": "Source path"
},
"dest": {
"type": "string",
"description": "Destination path"
},
"overwrite": {
"default": false,
"description": "Overwrite existing files (default: false)",
"type": "boolean"
}
},
"required": [
"src",
"dest"
]
},
"output": {
"type": "object",
"properties": {
"src": {
"type": "string",
"description": "The old path"
},
"dest": {
"type": "string",
"description": "The new path"
}
},
"required": [
"src",
"dest"
],
"additionalProperties": {}
}
}