fs-promise

  • Version 2.0.3
  • Published
  • 4 dependencies
  • MIT license

Install

npm i fs-promise
yarn add fs-promise
pnpm add fs-promise

Overview

[DEPRECATED] Use mz or fs-extra^3.0 with Promise Support

Index

Functions

function copy

copy: (src: string, dst: string) => Promise<void>;

    function createFile

    createFile: (file: string) => Promise<void>;
      createLink: (srcpath: string, dstpath: string) => Promise<void>;
        createSymlink: (
        srcpath: string,
        dstpath: string,
        type?: 'dir' | 'file' | 'junction'
        ) => Promise<void>;

          function emptydir

          emptydir: (dir: string) => Promise<void>;

            function emptyDir

            emptyDir: (dir: string) => Promise<void>;

              function ensureDir

              ensureDir: (dir: string) => Promise<void>;

                function ensureFile

                ensureFile: (file: string) => Promise<void>;
                  ensureLink: (srcpath: string, dstpath: string) => Promise<void>;
                    ensureSymlink: (
                    srcpath: string,
                    dstpath: string,
                    type?: 'dir' | 'file' | 'junction'
                    ) => Promise<void>;

                      function mkdirp

                      mkdirp: (dir: string) => Promise<void>;

                        function mkdirs

                        mkdirs: (dir: string) => Promise<void>;

                          function move

                          move: (src: string, dst: string) => Promise<void>;

                            function outputFile

                            outputFile: (
                            file: string,
                            data: string | Buffer,
                            options?: WriteOptions
                            ) => Promise<void>;

                              function outputJson

                              outputJson: (
                              file: string,
                              data: any,
                              options?: WriteJsonOptions
                              ) => Promise<void>;

                                function outputJSON

                                outputJSON: (
                                file: string,
                                data: any,
                                options?: WriteJsonOptions
                                ) => Promise<void>;

                                  function readJson

                                  readJson: (file: string, options?: ReadJsonOptions) => Promise<any>;

                                    function readJSON

                                    readJSON: (file: string, options?: ReadJsonOptions) => Promise<any>;

                                      function remove

                                      remove: (path: string) => Promise<void>;

                                        function writeJson

                                        writeJson: (
                                        file: string,
                                        data: any,
                                        options?: WriteJsonOptions
                                        ) => Promise<void>;

                                          function writeJSON

                                          writeJSON: (
                                          file: string,
                                          data: any,
                                          options?: WriteJsonOptions
                                          ) => Promise<void>;

                                            Interfaces

                                            interface ReadJsonOptions

                                            interface ReadJsonOptions {}

                                              property encoding

                                              encoding: string;

                                                property flag

                                                flag?: string;

                                                  property reviver

                                                  reviver: (key: any, value: any) => any;

                                                    interface WriteJsonOptions

                                                    interface WriteJsonOptions extends WriteOptions {}

                                                      property replacer

                                                      replacer?: JsonReplacer;

                                                        property spaces

                                                        spaces?: number;

                                                          interface WriteOptions

                                                          interface WriteOptions {}

                                                            property encoding

                                                            encoding?: string;

                                                              property flag

                                                              flag?: string;

                                                                property mode

                                                                mode?: number;

                                                                  Package Files (1)

                                                                  Dependencies (4)

                                                                  Dev Dependencies (8)

                                                                  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/fs-promise.

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