Nuanced Pumpkin Mavens

    dyna-node-fs
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.4 • Public • Published

    About

    Basic node.js file actions that return Promises.

    No dependencies, can fit easy with universal projects.

    Written in Typescript, runs everywhere.

    Methods

    loadJSON(filename: string): Promise

    Loads a file.

    Resolves with a object saved in the JSON file.

    saveJSON(filename: string, data: any, humanReadable: boolean = false): Promise

    Saves a file with an object is JSON format.

    exists(filename: string): Promise

    Resolves with boolean is the file exists or not.

    deleteFile(filename: string): Promise

    more commands later

    mkdir(path: string): Promise

    Create a directories recursively.

    rmdir(path: string): Promise

    Deletes a directory with all contents of it.

    isFolderEmpty(path: string): Promise

    Returns true if the folder contains files or sub folders.

    Keywords

    none

    Install

    npm i dyna-node-fs

    DownloadsWeekly Downloads

    1

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    61.6 kB

    Total Files

    30

    Last publish

    Collaborators

    • dennisat