import { DeepCopyOpts, Integer } from '@epdoc/typeutil';
import { FSItem } from './fsitem';
/**
 * Represents a file path.
 */
export type FilePath = string;
/**
 * Represents a folder path.
 */
export type FolderPath = string;
/**
 * Represents a file name including it's extension.
 */
export type FileName = string;
/**
 * Represents a file extension, excluding the leading dot (e.g., 'txt').
 */
export type FileExt = string;
/**
 * Represents a folder name.
 */
export type FolderName = string;
/**
 * Type guard checks if the given value is a valid file name.
 *
 * @param {any} val The value to check.
 * @returns True if the value is a non-empty string, false otherwise.
 */
export declare function isFilename(val: any): val is FileName;
/**
 * Type guard checks if the given value is a valid folder path.
 *
 * @param val The value to check.
 * @returns True if the value is a non-empty string, false otherwise.
 */
export declare function isFolderPath(val: any): val is FolderPath;
/**
 * Type guard checks if the given value is a valid file path.
 *
 * @param val The value to check.
 * @returns True if the value is a non-empty string, false otherwise.
 */
export declare function isFilePath(val: any): val is FilePath;
export type FsDeepCopyOpts = DeepCopyOpts & {
    includeUrl?: any;
};
/**
 * Represents the possible conflict resolution strategies for a file.
 */
export type FileConflictStrategy = {
    type: 'renameWithTilde';
    errorIfExists?: boolean;
} | {
    type: 'renameWithNumber';
    separator?: string;
    limit?: Integer;
    errorIfExists?: boolean;
} | {
    type: 'overwrite';
    errorIfExists?: boolean;
} | {
    type: 'error';
    errorIfExists?: boolean;
};
/**
 * A mapping of conflict strategy types to their string representations.
 */
export declare const fileConflictStrategyType: {
    readonly renameWithTilde: "renameWithTilde";
    readonly renameWithNumber: "renameWithNumber";
    readonly overwrite: "overwrite";
    readonly error: "error";
};
/**
 * Type representing the possible conflict strategy types.
 * This type is derived from the keys of the `fileConflictStrategyType` object.
 */
export type FileConflictStrategyType = (typeof fileConflictStrategyType)[keyof typeof fileConflictStrategyType];
/**
 * Checks if a given value is a valid FileConflictStrategyType.
 *
 * @param value The value to check.
 * @returns True if the value is a valid FileConflictStrategyType, false otherwise.
 */
export declare function isFileConflictStrategyType(value: unknown): value is FileConflictStrategyType;
/**
 * Represents the options for the safeCopy method.
 */
export type SafeCopyOpts = {
    /**
     * Whether to move or copy the file.
     */
    move?: boolean;
    /**
     * The strategy to use when a file with the same name already exists.
     */
    conflictStrategy?: FileConflictStrategy;
    /**
     * Whether to ensure the parent directories exist before the operation.
     */
    ensureParentDirs?: boolean;
    /**
     * Don't actually move or copy the file, just execute the logic around it
     * */
    test?: boolean;
};
export type FSSortOpts = {
    type?: 'alphabetical' | 'size';
    direction?: 'ascending' | 'descending';
};
export type FSItemCallback = (fs: FSItem) => Promise<any>;
export type GetChildrenOpts = FSSortOpts & {
    match: RegExp | string | undefined;
    levels: Integer;
    sort?: FSSortOpts;
    callback?: FSItemCallback;
};
