UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

uip 或存储桶文件

“uip 或 bucket-files”的语法和选项,用于管理 Orchestrator 存储桶中的文件。

管理存储桶中的文件:列出、检查、下载、上传、删除和获取预签名 URL。每个子命令均接受 <bucket-key> 作为其第一个参数。有关存储桶本身(跨文件夹创建/共享/列出),请参阅uip or buckets 。

有关跨资源约定(身份验证、文件夹作用域、密钥类型、输出信封),请参阅uip or概述。

大纲​

uip or bucket-files list              <bucket-key> --folder-path <path> | --folder-key <key> [--prefix <path> | -d <directory>] [--take-hint <n>] [--continuation-token <token>] [--expiry-in-minutes <n>] [--all-fields]
uip or bucket-files list-dirs         <bucket-key> --folder-path <path> | --folder-key <key> [-d <directory>] [--file-name-glob <pattern>] [-l <n>] [--offset <n>] [--all-fields]
uip or bucket-files get               <bucket-key> <path> --folder-path <path> | --folder-key <key> [--all-fields]
uip or bucket-files delete            <bucket-key> <path> --folder-path <path> | --folder-key <key> --yes
uip or bucket-files download          <bucket-key> <path> --folder-path <path> | --folder-key <key> [-d <local-file>]
uip or bucket-files upload            <bucket-key> <path> --folder-path <path> | --folder-key <key> --file <local-file> [--content-type <mime>]
uip or bucket-files get-download-url  <bucket-key> <path> --folder-path <path> | --folder-key <key> [--expiry-in-minutes <n>]
uip or bucket-files get-upload-url    <bucket-key> <path> --folder-path <path> | --folder-key <key> [--expiry-in-minutes <n>] [--content-type <mime>]
uip or bucket-files list              <bucket-key> --folder-path <path> | --folder-key <key> [--prefix <path> | -d <directory>] [--take-hint <n>] [--continuation-token <token>] [--expiry-in-minutes <n>] [--all-fields]
uip or bucket-files list-dirs         <bucket-key> --folder-path <path> | --folder-key <key> [-d <directory>] [--file-name-glob <pattern>] [-l <n>] [--offset <n>] [--all-fields]
uip or bucket-files get               <bucket-key> <path> --folder-path <path> | --folder-key <key> [--all-fields]
uip or bucket-files delete            <bucket-key> <path> --folder-path <path> | --folder-key <key> --yes
uip or bucket-files download          <bucket-key> <path> --folder-path <path> | --folder-key <key> [-d <local-file>]
uip or bucket-files upload            <bucket-key> <path> --folder-path <path> | --folder-key <key> --file <local-file> [--content-type <mime>]
uip or bucket-files get-download-url  <bucket-key> <path> --folder-path <path> | --folder-key <key> [--expiry-in-minutes <n>]
uip or bucket-files get-upload-url    <bucket-key> <path> --folder-path <path> | --folder-key <key> [--expiry-in-minutes <n>] [--content-type <mime>]

列表​

列出存储桶中的文件。两种互斥模式:默认(平面、前缀筛选)模式通过 --take-hint(默认 500,最大 1000)和 --continuation-token 进行分页,并接受 --prefix <path> 和 --expiry-in-minutes <n>(适用于预签名的下载 URL包含在每个项目中)。传递 -d, --directory <path> 会切换到 Orchestrator 的目录列表 API,这是一种不同的响应形状,没有继续令牌,并且与 --prefix、--take-hint、--continuation-token 和 --expiry-in-minutes 不兼容。--all-fields 返回完整的 API 响应。

uip or bucket-files list a1b2c3d4-0000-0000-0000-000000000001 \
  --folder-path Shared
uip or bucket-files list a1b2c3d4-0000-0000-0000-000000000001 \
  --folder-path Shared

列表目录​

列出虚拟目录。可选的 -d, --directory <path>(如果省略,则列出根目录)、--file-name-glob <pattern>、-l, --limit、--offset、--all-fields。

请前往 <path> 获取文件元数据。 --all-fields 返回完整的 API 响应。

删除​

在 <path> 中删除文件。需要 -y, --yes — CLI 从不提示您进行破坏性操作。

uip or bucket-files delete a1b2c3d4-0000-0000-0000-000000000001 \
  "reports/summary.csv" --folder-path Shared --yes
uip or bucket-files delete a1b2c3d4-0000-0000-0000-000000000001 \
  "reports/summary.csv" --folder-path Shared --yes

下载​

下载文件。使用-d, --destination <file>时,写入磁盘(发出BucketFileDownload信封);如果没有,请将内容流式传输到标准输出。

uip or bucket-files download a1b2c3d4-0000-0000-0000-000000000001 \
  "reports/summary.csv" --folder-path Shared --destination ./summary.csv
uip or bucket-files download a1b2c3d4-0000-0000-0000-000000000001 \
  "reports/summary.csv" --folder-path Shared --destination ./summary.csv

上传​

上传本地文件。需要--file <local-file> 。可选--content-type <mime> (如果省略,则自动检测到)。

uip or bucket-files upload a1b2c3d4-0000-0000-0000-000000000001 \
  "reports/summary.csv" --folder-path Shared --file ./summary.csv
uip or bucket-files upload a1b2c3d4-0000-0000-0000-000000000001 \
  "reports/summary.csv" --folder-path Shared --file ./summary.csv

获取下载 URL/获取上传 URL​

返回文件位置的预签名 URL,而无需通过 CLI 传输任何数据。可选的 --expiry-in-minutes <n>;上传变体也接受 --content-type。要以端到端的方式上传本地文件(预签名和传输一步完成),请改用 bucket-files upload。

退出代码​

请参阅共享合同的退出代码。如果省略 delete,1 将退出 -y, --yes。

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新