Path - List
列出给定文件系统中的路径及其属性。
GET https://{accountName}.{dnsSuffix}/{filesystem}?recursive={recursive}&resource=filesystem
GET https://{accountName}.{dnsSuffix}/{filesystem}?directory={directory}&recursive={recursive}&continuation={continuation}&maxResults={maxResults}&upn={upn}&resource=filesystem&timeout={timeout}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
account
|
path | True |
string |
Azure 存储帐户名称。 |
dns
|
path | True |
string |
Azure Data Lake Storage 终结点的 DNS 后缀。 |
filesystem
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[$a-z0-9](?!.*--)[-a-z0-9]{1,61}[a-z0-9]$ |
文件系统标识符。 该值必须以字母或数字开头和结尾,并且必须仅包含字母、数字和短划线(-)字符。 不允许连续短划线。 所有字母都必须小写。 该值必须介于 3 到 63 个字符之间。 |
recursive
|
query | True |
boolean |
如果为“true”,则列出所有路径;否则,只会列出文件系统根目录中的路径。 如果指定了“directory”,则列表将仅包含共享同一根路径的路径。 |
resource
|
query | True |
该值必须为所有文件系统作的“filesystem”。 |
|
continuation
|
query |
string |
每个调用返回的路径数是有限的。 如果要返回的路径数超过此限制,则会在响应标头 x-ms-continuation 中返回延续标记。 在响应中返回继续标记时,必须在后续调用列表作中指定该标记才能继续列出路径。 请注意,响应标头 x-ms-continuation 中返回的延续令牌必须在后续调用中使用之前进行 URL 编码。 |
|
directory
|
query |
string |
将结果筛选为指定目录中的路径。 如果目录不存在,则会发生错误。 |
|
max
|
query |
integer (int32) minimum: 1 |
一个可选值,该值指定要返回的最大项数。 如果省略或大于 5,000 个,响应将包含最多 5,000 个项。 |
|
timeout
|
query |
integer (int32) minimum: 1 |
可选操作超时值(以秒为单位)。 句点从服务接收请求时开始。 如果超时值在操作完成之前运行,则操作将失败。 |
|
upn
|
query |
boolean |
可选。 仅在为帐户启用分层命名空间时有效。 如果为“true”,则每个列表项的所有者和组字段中返回的用户标识值将从 Azure Active Directory 对象 ID 转换为用户主体名称。 如果为“false”,则值将作为 Azure Active Directory 对象 ID 返回。 默认值为 false。 请注意,组和应用程序对象 ID 不会翻译,因为它们没有唯一的友好名称。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
x-ms-client-request-id |
string pattern: ^[{(]?[0-9a-f]{8}[-]?([0-9a-f]{4}[-]?){3}[0-9a-f]{12}[)}]?$ |
分析日志中记录的 UUID,用于故障排除和关联。 |
|
x-ms-date |
string |
指定请求的协调世界时(UTC)。 使用共享密钥授权时,这是必需的。 |
|
x-ms-version |
string |
指定用于处理请求的 REST 协议的版本。 使用共享密钥授权时,这是必需的。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行 标头
|
|
Other Status Codes |
发生错误。 下面列出了可能的 HTTP 状态、代码和消息字符串:
标头
|
定义
名称 | 说明 |
---|---|
Data |
|
Error |
服务错误响应对象。 |
Filesystem |
该值必须为所有文件系统作的“filesystem”。 |
Path | |
Path |
DataLakeStorageError
名称 | 类型 | 说明 |
---|---|---|
error |
服务错误响应对象。 |
Error
服务错误响应对象。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务错误代码。 |
message |
string |
服务错误消息。 |
FilesystemResourceType
该值必须为所有文件系统作的“filesystem”。
值 | 说明 |
---|---|
filesystem |
Path
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
contentLength |
integer (int64) |
||
etag |
string |
||
group |
string |
||
isDirectory |
boolean |
False | |
lastModified |
string |
||
name |
string |
||
owner |
string |
||
permissions |
string |
||
x-ms-encryption-context |
string |
如果设置加密上下文属性值,它将返回设置值。 仅在为帐户启用分层命名空间时有效。 |
|
x-ms-encryption-key-sha256 |
string |
服务器将回显客户提供加密密钥的 SHA256,以验证作中使用的密钥。 |
|
x-ms-encryption-scope |
string |
如果请求使用了加密范围,则客户端可以确保使用加密范围成功加密请求的内容。 |
|
x-ms-server-encrypted: true/false |
boolean |
如果请求的内容是使用指定的算法成功加密的,则此标头的值设置为 true。 |
PathList
名称 | 类型 | 说明 |
---|---|---|
paths |
Path[] |