@types/memory-fs

  • Version 0.3.7
  • Published
  • 5.13 kB
  • 1 dependency
  • MIT license

Install

npm i @types/memory-fs
yarn add @types/memory-fs
pnpm add @types/memory-fs

Overview

TypeScript definitions for memory-fs

Index

Classes

class MemoryFileSystem

class MemoryFileSystem {}

    constructor

    constructor(data?: any);

      property data

      data: any;

        method createReadStream

        createReadStream: (
        path: string,
        options?: { start: number; end: number }
        ) => any;

          method createWriteStream

          createWriteStream: (path: string, options?: any) => any;

            method exists

            exists: (path: string, callback: (isExist: boolean) => void) => void;

              method existsSync

              existsSync: (_path: string) => boolean;

                method join

                join: (path: string, request: string) => string;

                  method meta

                  meta: (_path: string) => any;

                    method mkdir

                    mkdir: {
                    (path: string, callback: (err: Error | null) => void): void;
                    (
                    path: string,
                    optArg: {},
                    callback: (err: Error, result?: any) => void
                    ): void;
                    };

                      method mkdirp

                      mkdirp: (
                      path: string,
                      callback: (err: Error | null, result?: any) => void
                      ) => void;

                        method mkdirpSync

                        mkdirpSync: (_path: string) => void;

                          method mkdirSync

                          mkdirSync: (_path: string) => void;

                            method normalize

                            normalize: (path: string) => string;

                              method pathToArray

                              pathToArray: (path: string) => string[];

                                method readdir

                                readdir: (
                                path: string,
                                callback: (err: Error | null, result?: any) => void
                                ) => void;

                                  method readdirSync

                                  readdirSync: (_path: string) => string[];

                                    method readFile

                                    readFile: {
                                    (path: string, callback: (err: Error | null, result?: any) => void): void;
                                    (
                                    path: string,
                                    optArg: {},
                                    callback: (err: Error, result?: any) => void
                                    ): void;
                                    };

                                      method readFileSync

                                      readFileSync: (_path: string, encoding?: string) => any;
                                        readlink: (
                                        path: string,
                                        callback: (err: Error | null, result?: any) => void
                                        ) => void;

                                          method readlinkSync

                                          readlinkSync: (_path: string) => string;

                                            method rmdir

                                            rmdir: (
                                            path: string,
                                            callback: (err: Error | null, result?: any) => void
                                            ) => void;

                                              method rmdirSync

                                              rmdirSync: (_path: string) => void;

                                                method stat

                                                stat: (
                                                path: string,
                                                callback: (err: Error | null, result?: any) => void
                                                ) => void;

                                                  method statSync

                                                  statSync: (_path: string) => {
                                                  isFile: () => boolean;
                                                  isDirectory: () => boolean;
                                                  isBlockDevice: () => boolean;
                                                  isCharacterDevice: () => boolean;
                                                  isSymbolicLink: () => boolean;
                                                  isFIFO: () => boolean;
                                                  isSocket: () => boolean;
                                                  };
                                                    unlink: (
                                                    path: string,
                                                    callback: (err: Error | null, result?: any) => void
                                                    ) => void;

                                                      method unlinkSync

                                                      unlinkSync: (_path: string) => void;

                                                        method writeFile

                                                        writeFile: {
                                                        (
                                                        path: string,
                                                        content: string | Buffer,
                                                        callback: (err: Error | undefined) => void
                                                        ): void;
                                                        (
                                                        path: string,
                                                        content: any,
                                                        encoding: string,
                                                        callback: (err: Error) => void
                                                        ): void;
                                                        };

                                                          method writeFileSync

                                                          writeFileSync: (
                                                          _path: string,
                                                          content: string | Buffer,
                                                          encoding?: string
                                                          ) => void;

                                                            Package Files (1)

                                                            Dependencies (1)

                                                            Dev Dependencies (0)

                                                            No dev dependencies.

                                                            Peer Dependencies (0)

                                                            No peer dependencies.

                                                            Badge

                                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/memory-fs.

                                                            • Markdown
                                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/memory-fs)
                                                            • HTML
                                                              <a href="https://www.jsdocs.io/package/@types/memory-fs"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>