vamtiger-create-file
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

VAMTIGER Create File

Create a file for a defined path.

Installation

VAMTIGER Create File can be installed using npm or yarn:

npm install --save vamtiger-create-file

or

yarn add vamtiger-create-file

Usage

Import or require a referece to VAMTIGER Create File:

import createFile from 'vamtiger-create-file';

or

const createFile = require('vamtiger-create-file').default;

VAMTIGER Create File can create an empty file:

createFile('some/file/absolute/path')
    .then(handleResult)
    .catch(handleError);

File data can also be written the the new file:

createFile('some/file/absolute/path', 'Some file data')
    .catch(handleError);

VAMTIGER Create File returns a Promise, it can be more conveniently executed within an async function:

async someAsyncFunction function() {
    const fileData = 'Some file data';
    
    await createFile('some/file/absolute/path', fileData);
}

/vamtiger-create-file/

    Package Sidebar

    Install

    npm i vamtiger-create-file

    Weekly Downloads

    75

    Version

    0.0.10

    License

    MIT

    Unpacked Size

    6.79 kB

    Total Files

    10

    Last publish

    Collaborators

    • vamtiger-project