Browse
du GET
Show the number of files and bytes used under a directory.
const { du } = await ns.duAsync("/123456");
console.log(du["du-info"][0].files, du["du-info"][0].bytes);ns.du("/123456", (err, res, body) => {
if (!err) console.log(body?.du["du-info"][0].bytes);
});npx akamai-netstorage du staticSignatures
duAsync(ns_path: string): Promise<DuResponse>
du(ns_path: string, callback: (err: any, res?: http.IncomingMessage, body?: DuResponse) => void): void
Parameters
| Name | Type | Description |
|---|---|---|
ns_path | string | NetStorage directory path. |
Returns
DuResponse
{ du: { attribs: { directory }, "du-info": [{ files, bytes }] } }
On the wire
| HTTP method | GET |
| X-Akamai-ACS-Action | version=1&action=du&format=xml |
| Signed with | X-Akamai-ACS-Auth-Data and X-Akamai-ACS-Auth-Sign (HMAC-SHA256) |
| CLI | akamai-netstorage du static |