Boffin Codersts-netstorageapi-akamaiby Boffin Coders

Browse

dir GET

List the entries of one directory.

const { stat } = await ns.dirAsync({
  path: "/123456/images",
  actions: { max_entries: "100", prefix: "2026-" },
});
for (const entry of stat.file) console.log(entry.type, entry.name, entry.size);

Signatures

dirAsync(opts: DirListOpts | string): Promise<DirResponse>
dir(opts: DirListOpts | string, callback: (err: any, res?: http.IncomingMessage, body?: DirResponse) => void): void

Parameters

NameTypeDescription
optsstring | DirListOptsA path, or { path, actions } with max_entries, prefix, start, end, encoding or slash.

Returns

DirResponse

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

On the wire

HTTP methodGET
X-Akamai-ACS-Actionversion=1&action=dir&format=xml
Signed withX-Akamai-ACS-Auth-Data and X-Akamai-ACS-Auth-Sign (HMAC-SHA256)
CLIakamai-netstorage ls images --max-entries 100

Build and sign this request in the playground →

Notes

← downloadBufferlist →