Boffin Codersts-netstorageapi-akamaiby Boffin Coders

Browse

stat GET

Get details of a file or directory.

const { stat } = await ns.statAsync("/123456/static/app.js");
const [file] = stat.file;
console.log(file.size, file.md5);

Signatures

statAsync(ns_path: string): Promise<StatResponse>
stat(ns_path: string, callback: (err: any, res?: http.IncomingMessage, body?: StatResponse) => void): void

Parameters

NameTypeDescription
ns_pathstringNetStorage path.

Returns

StatResponse

{ stat: { attribs: { directory }, file: [{ type, name, mtime, size?, md5? }] } }

On the wire

HTTP methodGET
X-Akamai-ACS-Actionversion=1&action=stat&format=xml
Signed withX-Akamai-ACS-Auth-Data and X-Akamai-ACS-Auth-Sign (HMAC-SHA256)
CLIakamai-netstorage stat static/app.js

Build and sign this request in the playground →

Notes

← dumkdir →