/// import { inspect } from 'xshell'; export declare class TorrentData { fp_torrent: string; /** 种子任务名称 */ caption: string; /** 错误说明,如:任务文件丢失。请重新检查。 */ dl_error: string; /** 若种子文件只包含一个文件,则 path 为该文件的完整存储路径, 否则 path 为文件夹的位置 */ path: string; /** 高级 > 设置目标名称 文件位置的重定位表,格式为 [index, fp][],未重定位则无此字段 index: 种子文件的文件列表所对应的文件序号 (从 0 开始编号) fp: 文件重定位后的相对 path 的路径 比如: 0 : 1.mkv 2 : 3.mkv 351: SPs/24-blabla.mkv */ targets?: [number, string][]; downloaded: number; uploaded: number; blocksize: number; trackers: string[]; labels: string[]; started: number; valid: number; have: Buffer; hashed: Buffer; known: Buffer; [key: string]: any; constructor(fp_torrent: string, data: any); to_str(): string; [inspect.custom](): string; to_data(): any; relocate_torrent(fp_torrent: string): void; fix(): void; } export declare class TorrentFile { info: { files?: { length: number; path: string; }[]; name: string; 'piece length': number; pieces: Buffer; }; private constructor(); static parse(fp: string): Promise; get_fps(): string[]; [inspect.custom](): string; } export declare class ResumeData { fp_resume_dat: string; rec: Buffer; torrents: TorrentData[]; private constructor(); static parse(fp_resume_dat: string): Promise; save(fp?: string): Promise; relocate_paths(src: string, dest: string, filter?: (td: TorrentData) => boolean): void; /** 根据 pattern 查找首个匹配的种子,不传 pattern 参数时返回最近添加的种子 */ find_torrent(pattern?: string | RegExp): TorrentData; find_torrents(pattern: string | RegExp): TorrentData[]; [inspect.custom](): string; } export default ResumeData;