/** * Converts bytes number to string representation (e.g. `15.25 GB`). * * @example * ``` * formatBytes(1648 * 9884) * // '15.53 MB' * ``` */ export declare function formatBytes(bytes: number, decimals?: number): string; /** * Parses size string to bytes. * * @example * ``` * parseSize('15.53 MB') * // 16288832 * ``` * @returns parsed bytes or `-1` on fail */ export declare function parseSize(value: string): number; /** * Split the pathname path into a pair (root, ext) such that root + ext == path, * and ext is empty or begins with a period and contains at most one period. * Leading periods on the basename are ignored. * * @example * ``` * getFileParts('file.txt') * // ['file', '.txt'] * * getFileParts('.cshrc') * // ['.cshrc', ''] * ``` */ export declare function getFileParts(pathname: string): [string, string]; /** * Returns mime type from file name * * @example * ``` * getMimeType('file.txt') // text/plain * getMimeType('file.unknown') // undefined * getMimeType('json') // application/json * ``` */ export declare function getMimeType(name: string): string | undefined; /** * Returns file extension from mime type * * @example * ``` * getExtension('text/plain') // txt * getExtension('application/json') // json * getExtension('application/unknown') // undefined * ``` */ export declare function getExtension(mimeType: string): string | undefined;