Queries whether a specified directory contains files that are dumped to an IA storage medium or whether a specified file is dumped to an IA storage medium.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesGetDirectoryOrFileProperties

The operation that you want to perform.

Set the value to GetDirectoryOrFileProperties.

FileSystemIdStringYes31a8e4****

The ID of the file system.

PathStringYes/pathway/to/folder

The absolute path of the directory.

The path must start with a forward slash (/) and must be a path that exists in the mount target.

Response parameters

ParameterTypeExampleDescription
EntryObject

The details about the files or directories.

TypeStringFile

The type of the query result.

Valid values:

  • File
  • Directory
HasInfrequentAccessFileBooleantrue

Indicates whether the files contain the data that is dumped to the IA storage medium.

This parameter is returned only if the value of the Type parameter is Directory.

Valid values:

  • true: The files contain data that is dumped to the IA storage medium.
  • false: The files do not contain data that is dumped to the IA storage medium.
MTimeString2021-02-11T10:08:08Z

The time when the file was last modified.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.

This parameter is returned only if the value of the Type parameter is File.

ATimeString2021-02-01T10:08:08Z

The time range for the query.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.

This parameter is returned only if the value of the Type parameter is File.

SizeLong1024

The size of the files.

Unit: bytes.

This parameter is returned only if the value of the Type parameter is File.

CTimeString2021-02-11T10:08:10Z

The time when the raw data was modified.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.

This parameter is returned only if the value of the Type parameter is File.

StorageTypeStringInfrequentAccess

The storage type of the files.

This parameter is returned only if the value of the Type parameter is File.

Valid values:

  • standard: General-purpose NAS file system
  • InfrequentAccess: IA storage medium
NameStringfile.txt

The name of the file or directory.

RetrieveTimeString2021-02-11T10:08:08Z

The time when the last data retrieval task was run.

The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format.

This parameter is returned only if the value of the Type parameter is File.

InodeString40

The file or directory inode.

RequestIdString2D69A58F-345C-4FDE-88E4-BF518948****

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetDirectoryOrFileProperties
&FileSystemId=31a8e4****
&Path=/pathway/to/folder
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetDirectoryOrFilePropertiesResponse>
    <Entry>
        <Type>File</Type>
        <HasInfrequentAccessFile>true</HasInfrequentAccessFile>
        <MTime>2021-02-11T10:08:08Z</MTime>
        <ATime>2021-02-01T10:08:08Z</ATime>
        <Size>1024</Size>
        <CTime>2021-02-11T10:08:10Z</CTime>
        <StorageType>InfrequentAccess</StorageType>
        <Name>file.txt</Name>
        <RetrieveTime>2021-02-11T10:08:08Z</RetrieveTime>
        <Inode>Inode</Inode>
    </Entry>
    <RequestId>2D69A58F-345C-4FDE-88E4-BF518948****</RequestId>
</GetDirectoryOrFilePropertiesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Entry" : {
    "Type" : "File",
    "HasInfrequentAccessFile" : true,
    "MTime" : "2021-02-11T10:08:08Z",
    "ATime" : "2021-02-01T10:08:08Z",
    "Size" : 1024,
    "CTime" : "2021-02-11T10:08:10Z",
    "StorageType" : "InfrequentAccess",
    "Name" : "file.txt",
    "RetrieveTime" : "2021-02-11T10:08:08Z",
    "Inode" : "Inode"
  },
  "RequestId" : "2D69A58F-345C-4FDE-88E4-BF518948****"
}

Error codes

HTTP status codeError codeError messageDescription
404InvalidFileSystem.NotFoundThe specified file system does not exist.The error message returned because the specified file system does not exist.
404InvalidParameter.PathNotExistThe specified path does not exist.The error message returned because the specified path does not exist.

For a list of error codes, see Service error codes.