@atomist/automation-client
Version:
Atomist API for software low-level client
27 lines • 1.22 kB
TypeScript
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 name: string;
readonly extension: string;
abstract getContentSync(): string;
abstract setContentSync(content: string): this;
abstract getContent(): Promise<string>;
abstract setContent(content: string): Promise<this>;
recordSetContent(newContent: string): this;
rename(name: string): Promise<this>;
recordRename(name: string): this;
abstract setPath(path: string): Promise<this>;
recordSetPath(path: string): this;
replace(re: RegExp, replacement: string): Promise<this>;
replaceAll(oldLiteral: string, newLiteral: string): Promise<this>;
recordReplace(re: RegExp, replacement: string): this;
recordReplaceAll(oldLiteral: string, newLiteral: string): this;
abstract isExecutable(): Promise<boolean>;
abstract isReadable(): Promise<boolean>;
abstract isBinary(): Promise<boolean>;
}
//# sourceMappingURL=AbstractFile.d.ts.map