netstorage
Version:
A TypeScript API and CLI for the Akamai NetStorage REST interface
21 lines (20 loc) • 783 B
TypeScript
import type { RemoteWalkEntry } from '../index';
/**
* Represents the aggregated size for a directory.
*
* @property {number} aggregatedSize - The total size in bytes of files within the directory and its subdirectories.
*/
interface AggregatedSize {
aggregatedSize: number;
}
/**
* Computes cumulative file sizes for directories based on a list of remote walk entries.
*
* Entries are processed in reverse depth order to ensure that sizes of child directories
* and files are rolled up to their parents.
*
* @param entries - List of remote file system entries to aggregate.
* @returns A map of directory paths to their aggregated sizes in bytes.
*/
export declare function aggregateDirectorySizes(entries: RemoteWalkEntry[]): Map<string, AggregatedSize>;
export {};