import type { ChecksumBase } from './squared'; import type { StreamAction } from './asset'; import type { HashOptions } from 'crypto'; declare enum NORMALIZE_FLAGS { NONE = 0, RESOLVE = 1, ENSURE_DIR = 2, POSIX = 4 } export interface RequireAction { requireExt?: ArrayOf | boolean; } export interface PermissionOptions { ownPermissionOnly?: boolean; hostPermissionOnly?: boolean; } export interface FileSystemOptions extends PermissionOptions { absolutePath?: boolean; ignorePermission?: boolean; throwsPermission?: boolean; throwsDoesNotExist?: boolean; } export interface ReadFileOptions extends FileSystemOptions, StreamBase, RequireAction { cache?: boolean; encoding?: BufferEncoding; } export interface WriteFileOptions extends FileSystemOptions { overwrite?: boolean; encoding?: BufferEncoding; } export interface DeleteFileOptions extends FileSystemOptions { emptyDir?: boolean; } export interface CopyFileOptions extends FileSystemOptions { overwrite?: boolean; createDir?: boolean; outSrc?: string; } export interface RemoveDirOptions extends FileSystemOptions { emptyDir?: boolean; recursive?: boolean; } export type MoveFileOptions = CopyFileOptions; export type CreateDirOptions = FileSystemOptions; export interface GetFunctionsOptions extends ParseFunctionOptions { outFailed?: string[]; } export interface ParseFunctionOptions extends RequireAction { absolute?: boolean; sync?: boolean; external?: boolean; context?: unknown; } export interface CloneObjectOptions { target?: T; deep?: boolean; deepIgnore?: WeakSet; typedArray?: boolean; symbol?: boolean; inherited?: boolean; nonenumerable?: boolean; preserve?: boolean; } export interface CheckSemVerOptions extends MinMax { startDir?: string; unstable: boolean; } export interface CopyDirOptions { move?: boolean; recursive?: boolean | number; symFile?: boolean; symDir?: boolean; ignoreFile?: RegExp; ignoreDir?: RegExp; silent?: boolean; overwrite?: boolean; } export interface CopyDirResult { success: string[]; failed: string[]; ignored: string[]; } export interface StreamBase extends StreamAction { signal?: AbortSignal; } export interface ReadHashOptions extends ChecksumBase, StreamBase { chunkSize?: number; } export interface ReadBufferOptions extends StreamBase { encoding?: BufferEncoding; cache?: boolean; } export interface AsHashOptions extends HashOptions, ChecksumBase { minLength?: number; } export interface GetTempDirOptions { pathname?: string; filename?: string; moduleDir?: boolean; uuidDir?: boolean; createDir?: boolean; increment?: number; } export interface ExecAction { uid?: NumString; gid?: NumString; } export interface IncludeAction { include?: T; exclude?: T; } export type NormalizeFlags = typeof NORMALIZE_FLAGS[keyof typeof NORMALIZE_FLAGS]; export type ReadTextOptions = ReadBufferOptions; export type ReadFileCallback = (err: Null, data?: T) => void; export type ProtocolType = "http" | "https" | "http/s" | "ftp" | "sftp" | "s/ftp" | "torrent" | "unc";