@atomist/automation-client
Version:
Atomist API for software low-level client
26 lines • 1.14 kB
TypeScript
/// <reference types="node" />
import { AbstractScriptedFlushable } from "../../internal/common/AbstractScriptedFlushable";
import { File } from "../File";
/**
* Convenient support for all File implementations
*/
export declare abstract class AbstractFile extends AbstractScriptedFlushable<File> implements File {
abstract path: string;
readonly cache: Record<string, object>;
get name(): string;
get extension(): string;
abstract getContentSync(): string;
abstract setContentSync(content: string): this;
abstract getContent(encoding?: string): Promise<string>;
abstract getContentBuffer(): Promise<Buffer>;
abstract setContent(content: string): Promise<this>;
rename(name: string): Promise<this>;
abstract setPath(path: string): Promise<this>;
replace(re: RegExp, replacement: string): Promise<this>;
replaceAll(oldLiteral: string, newLiteral: string): Promise<this>;
abstract isExecutable(): Promise<boolean>;
abstract isReadable(): Promise<boolean>;
abstract isBinary(): Promise<boolean>;
protected invalidateCache(): this;
}
//# sourceMappingURL=AbstractFile.d.ts.map