@qc2168/mib
Version:
data backup tool
32 lines (31 loc) • 1.18 kB
TypeScript
import { ExecAdbOptions } from "./utils/adb";
declare const _default: {};
export default _default;
export interface FileNodeType {
fileSize: number;
fileName: string;
filePath: string;
isDirectory: boolean;
fileMTime?: string | Date;
children: FileNodeType[] | null;
hash?: string | null;
}
export interface DiffOptionType {
checkMD5: boolean;
}
interface GetMobileNodesOptionType {
targetPath: string;
deep?: boolean;
adbOpt: ExecAdbOptions;
hash?: boolean;
}
export declare function getMobileFileNodeList(opt: GetMobileNodesOptionType): FileNodeType[];
export declare function createFileNode(targetFilePath: string, deep?: boolean, hash?: boolean): FileNodeType;
export interface GetLocalNodesOptionType {
targetPath: string;
deep?: boolean;
hash?: boolean;
}
export declare function getLocalFileNodeList({ targetPath, deep, hash }: GetLocalNodesOptionType): FileNodeType[];
export declare function diff(localArr: FileNodeType[], remoteArr: FileNodeType[], option?: Partial<DiffOptionType>): FileNodeType[];
export declare function computeNodeListSize(list: FileNodeType[]): number;