Beta

Read/write files on an agent runtime

用法: mf files [command]

Option

Option用途
-h, --helpdisplay help for command

Subcommand

命令用途
mf files rootsList available file roots for an agent
mf files listList directory entries on an agent
mf files statShow file metadata
mf files readRead file contents (to stdout or —output)
mf files writeWrite file contents from —content or —file
mf files uploadUpload a local file to an agent (remotePath defaults to the file name)
mf files downloadDownload a file from an agent (localPath defaults to the file name, - for stdout)
mf files mkdirCreate a directory on an agent
mf files mvMove or rename a path on an agent
mf files rmRemove a file or directory on an agent

mf files roots

List available file roots for an agent

用法: mf files roots [options] [agentId]

Argument

参数用途
[agentId]

Option

Option用途
--jsonemit raw JSON
-h, --helpdisplay help for command

mf files list

List directory entries on an agent

用法: mf files list [options] [agentIdOrPath] [path]

Alias: ls

Argument

参数用途
[agentIdOrPath]
[path]

Option

Option用途
--root <rootId>root id (default: workspace)
--jsonemit raw JSON
-h, --helpdisplay help for command

mf files stat

Show file metadata

用法: mf files stat [options] [agentIdOrPath] [path]

Argument

参数用途
[agentIdOrPath]
[path]

Option

Option用途
--root <rootId>root id
--jsonemit raw JSON (default)
-h, --helpdisplay help for command

mf files read

Read file contents (to stdout or —output)

用法: mf files read [options] [agentIdOrPath] [path]

Argument

参数用途
[agentIdOrPath]
[path]

Option

Option用途
--root <rootId>root id
--output <localPath>write to this local file instead of stdout
-h, --helpdisplay help for command

mf files write

Write file contents from —content or —file

用法: mf files write [options] [agentIdOrPath] [path]

Argument

参数用途
[agentIdOrPath]
[path]

Option

Option用途
--content <data>inline content (string)
--file <localPath>read content from a local file
--root <rootId>root id
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files upload

Upload a local file to an agent (remotePath defaults to the file name)

用法: mf files upload [options] <localPath> [remotePath]

Argument

参数用途
<localPath>
[remotePath]

Option

Option用途
--root <rootId>root id (default: workspace)
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files download

Download a file from an agent (localPath defaults to the file name, - for stdout)

用法: mf files download [options] <remotePath> [localPath]

Argument

参数用途
<remotePath>
[localPath]

Option

Option用途
--root <rootId>root id (default: workspace)
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files mkdir

Create a directory on an agent

用法: mf files mkdir [options] [agentIdOrPath] [path]

Argument

参数用途
[agentIdOrPath]
[path]

Option

Option用途
--root <rootId>root id
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files mv

Move or rename a path on an agent

用法: mf files mv [options] [agentIdOrFrom] [from] [to]

Argument

参数用途
[agentIdOrFrom]
[from]
[to]

Option

Option用途
--root <rootId>root id
--jsonoutput the result as JSON
-h, --helpdisplay help for command

mf files rm

Remove a file or directory on an agent

用法: mf files rm [options] [agentIdOrPath] [path]

Argument

参数用途
[agentIdOrPath]
[path]

Option

Option用途
--root <rootId>root id
--recursiveremove directories recursively
-y, --yesconfirm irreversible deletion
--jsonoutput the result as JSON
-h, --helpdisplay help for command
这个页面有帮助吗?