UNPKG

netstorage

Version:

A TypeScript API and CLI for the Akamai NetStorage REST interface

39 lines (38 loc) 1.47 kB
import { type RemoteWalkEntry } from '../../index'; interface RenderRemoteTreeOptions { showSize?: boolean; showMtime?: boolean; showChecksum?: boolean; showSymlinkTarget?: boolean; showRelativePath?: boolean; showAbsolutePath?: boolean; depthBuckets: { depth: number; entries: RemoteWalkEntry[]; }[]; directorySizeMap: Map<string, { aggregatedSize: number; }>; } /** * Retrieves immediate children from a group of depth-bucketed entries. * * @param depthBuckets - The bucketed tree structure. * @param parentPath - The path of the parent directory. * @param depth - The depth level of the children. * @returns Array of child entries at the specified depth. */ export declare function getChildrenForDepthBuckets(depthBuckets: { depth: number; entries: RemoteWalkEntry[]; }[], parentPath: string, depth: number): RemoteWalkEntry[]; /** * Generates a remote directory tree based on the provided entries and options. * * @param {RemoteWalkEntry[]} entries - Array of remote file system entries to render. * @param {RenderRemoteTreeOptions} options - Options for customizing the tree rendering. * @param {string} [prefix=''] - Prefix string for indentation. * @returns {string[]} An array of strings representing the rendered directory tree. */ export declare function generateRemoteTree(entries: RemoteWalkEntry[], options: RenderRemoteTreeOptions, prefix?: string): string[]; export {};