Skip to main content

FileService

Effects

Errors

Providers

Services

Effects

mkdir

Creates a directory in the file system

Signature

export declare const mkdir: (
path: fs.PathLike,
options?: fs.MakeDirectoryOptions,
) => RTE.ReaderTaskEither<FileService, FileServiceError, void>

Details

  • Added in 0.1.0

upsertDir

Creates a directory in the file system if it does not exist

Signature

export declare const upsertDir: (
path: fs.PathLike,
options?: fs.MakeDirectoryOptions,
) => RTE.ReaderTaskEither<FileService, FileServiceError, void>

Details

  • Added in 0.1.0

writeFile

Writes a file to the file system

Signature

export declare const writeFile: (
path: fs.PathLike,
content: string,
options?: fs.WriteFileOptions,
) => RTE.ReaderTaskEither<FileService, FileServiceError, void>

Details

  • Added in 0.1.0

Errors

FileServiceError

Represents a file service error

Signature

export declare class FileServiceError extends Error
constructor(Error: Error);

Details

  • Added in 0.1.0

Properties and Methods

Error (property)
readonly Error: Error;
name (property)
readonly name = "FileServiceError";
of (property)
static readonly of: (Error: Error) => FileServiceError;

Providers

FileServiceLive

A node-based implementation of the file service

Signature

export declare const FileServiceLive: FileService

Details

  • Added in 0.1.0

Services

FileService

Represents a minimal file service for the purpose of fp-tx/documenter

Signature

export declare class FileService
constructor(fileServiceMethods: FileServiceMethods);

Details

  • Added in 0.1.0

Properties and Methods

[FileServiceSymbol] (property)
[FileServiceSymbol]: FileServiceMethods;