UNPKG

@atomist/automation-client

Version:
55 lines 2.4 kB
import { RepoRef } from "../../operations/common/RepoId"; import { File } from "../File"; import { FileStream, Project } from "../Project"; import { AbstractProject } from "../support/AbstractProject"; import { LocalProject, ReleaseFunction } from "./LocalProject"; export declare class NodeFsLocalProject extends AbstractProject implements LocalProject { private cleanup; /** * Create a project from an existing directory. The directory must exist * @param {RepoRef} id * @param {string} baseDir * @param cleanup * @return {Promise<LocalProject>} */ static fromExistingDirectory(id: RepoRef, baseDir: string, cleanup?: ReleaseFunction): Promise<LocalProject>; /** * Copy the contents of the other project to this project * @param {Project} other * @param {string} baseDir * @param newName new name of the project. Defaults to name of old project * @param cleanup * @returns {LocalProject} */ static copy(other: Project, baseDir: string, cleanup?: ReleaseFunction): Promise<LocalProject>; /** * Base directory of the project on the local file system */ readonly baseDir: string; /** * Note: this does not validate existence of the target * directory, so using it except in tests should be avoided * @param {RepoRef} ident identification of the repo * @param {string} baseDir * @param cleanup function that will release locks, delete temp directories etc */ constructor(ident: RepoRef | string, baseDir: string, cleanup?: ReleaseFunction); release(): Promise<void>; addFileSync(path: string, content: string): void; addFile(path: string, content: string): Promise<this>; addDirectory(path: string): Promise<this>; deleteDirectory(path: string): Promise<this>; deleteDirectorySync(path: string): void; deleteFileSync(path: string): void; deleteFile(path: string): Promise<this>; makeExecutable(path: string): Promise<this>; makeExecutableSync(path: string): void; directoryExistsSync(path: string): boolean; fileExistsSync(path: string): boolean; findFile(path: string): Promise<File>; getFile(path: string): Promise<File>; findFileSync(path: string): File; streamFilesRaw(globPatterns: string[], opts: {}): FileStream; private toRealPath; } //# sourceMappingURL=NodeFsLocalProject.d.ts.map