UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

39 lines 2.07 kB
import * as nodeOS from 'node:os'; import type * as NodeFS from 'fs'; import { Path } from './Path'; export declare class FileSystem { private readonly root; private readonly fs; private readonly os; private readonly directoryMode; constructor(root: Path, fs?: typeof NodeFS, os?: typeof nodeOS, directoryMode?: number); resolve(relativeOrAbsolutePath: Path): Path; store(relativeOrAbsolutePathToFile: Path, data: string | NodeJS.ArrayBufferView, encoding?: NodeFS.WriteFileOptions): Promise<Path>; readFile(relativeOrAbsolutePathToFile: Path, options?: { encoding?: null | undefined; flag?: string | undefined; }): Promise<Buffer>; readFile(relativeOrAbsolutePathToFile: Path, options: { encoding: BufferEncoding; flag?: string | undefined; } | NodeJS.BufferEncoding): Promise<string>; readFileSync(relativeOrAbsolutePathToFile: Path, options?: { encoding?: null | undefined; flag?: string | undefined; }): Buffer; readFileSync(relativeOrAbsolutePathToFile: Path, options: { encoding: BufferEncoding; flag?: string | undefined; } | NodeJS.BufferEncoding): string; writeFile(relativeOrAbsolutePathToFile: Path, data: string | NodeJS.ArrayBufferView, options?: NodeFS.WriteFileOptions): Promise<Path>; writeFileSync(relativeOrAbsolutePathToFile: Path, data: string | NodeJS.ArrayBufferView, options?: NodeFS.WriteFileOptions): Path; createReadStream(relativeOrAbsolutePathToFile: Path): NodeFS.ReadStream; createWriteStreamTo(relativeOrAbsolutePathToFile: Path): NodeFS.WriteStream; stat(relativeOrAbsolutePathToFile: Path): Promise<NodeFS.Stats>; exists(relativeOrAbsolutePathToFile: Path): boolean; remove(relativeOrAbsolutePathToFileOrDirectory: Path): Promise<void>; ensureDirectoryExistsAt(relativeOrAbsolutePathToDirectory: Path): Promise<Path>; rename(source: Path, destination: Path): Promise<void>; tempFilePath(prefix?: string, suffix?: string): Path; } //# sourceMappingURL=FileSystem.d.ts.map