@truenewx/tnxet
Version:
互联网技术解决方案:Electron扩展支持
15 lines (11 loc) • 575 B
text/typescript
import constants from '../constants.ts';
import request from './request.ts';
export function filenames(zipPath: string): Promise<string[]> {
return request<string[]>(constants.event.zip.filenames, [zipPath]);
}
export function read(zipPath: string, filename: string): Promise<string> {
return request<string>(constants.event.zip.read, [zipPath, filename]);
}
export function readAll(zipPath: string, filenamePattern?: string): Promise<Record<string, string>> {
return request<Record<string, string>>(constants.event.zip.readAll, [zipPath, filenamePattern]);
}