import { RepoRef } from "../../operations/common/RepoId"; import { File } from "../File"; import { FileStream, Project } from "../Project"; import { AbstractProject } from "../support/AbstractProject"; /** * In memory Project implementation. Primarily intended * for testing. BE WARNED: Does not correctly handle permissions and binary files! */ export declare class InMemoryProject extends AbstractProject { /** * Create a new InMemoryProject * @param id: RepoRef * @param files files to include in the project * @return {InMemoryProject} */ static from(id: RepoRef, ...files: Array<{ path: string; content: string; } | File>): InMemoryProject; /** * Create a new InMemoryProject without an id */ static of(...files: Array<{ path: string; content: string; } | File>): InMemoryProject; /** * Make an independent copy of the given project, with the same files * @param {Project} p * @return {InMemoryProject} */ static cache(p: Project): Promise; /** * Directories added. May contain no files. Must * be included when copying to a file system. * @type {Array} */ readonly addedDirectoryPaths: string[]; private memFiles; constructor(xid?: RepoRef); readonly fileCount: number; readonly filesSync: File[]; findFile(path: string): Promise; getFile(path: string): Promise; findFileSync(path: string): File; recordAddFile(path: string, content: string): this; addFileSync(path: string, content: string): void; addFile(path: string, content: string): Promise; addDirectory(path: string): Promise; deleteDirectorySync(path: string): void; deleteDirectory(path: string): Promise; deleteFileSync(path: string): this; deleteFile(path: string): Promise; makeExecutableSync(path: string): void; directoryExistsSync(path: string): boolean; hasDirectory(path: string): Promise; fileExistsSync(path: string): boolean; streamFilesRaw(globPatterns: string[], opts: {}): FileStream; makeExecutable(path: string): Promise; } export declare function isInMemoryProject(p: Project): p is InMemoryProject;