UNPKG

netstorage

Version:

A TypeScript API and CLI for the Akamai NetStorage REST interface

34 lines (33 loc) 1.17 kB
import { type RequestOptions, type NetStorageClientConfig, type NetStorageFile } from '../index'; /** * Represents the parsed structure of a NetStorage `dir` response. * * @property stat - Contains optional directory name and an array of file entries. */ export interface NetStorageDir { stat: { directory?: string; file?: NetStorageFile[]; }; } /** * Parameters for the `dir` operation. * * @property path - The path of the directory to list. * @property options - Optional per-request configuration. */ export interface DirParams { path: string; options?: RequestOptions; } /** * Lists the contents of a NetStorage directory. * * Sends a `dir` request to the specified path and returns the directory structure, * including files and optional directory metadata. * * @param config - The NetStorage client config containing configuration and logger. * @param params - The parameters for the request, including path and options. * @returns A promise that resolves to the parsed directory structure. */ export declare function dir(config: NetStorageClientConfig, { path, options }: DirParams): Promise<NetStorageDir>;