vamtiger-create-file
Create a new file for a defined absolute path.
Last updated 2 years ago by vamtiger-project .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vamtiger-create-file 
SYNC missed versions from official npm registry.

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);
}

Current Tags

  • 0.0.10                                ...           latest (2 years ago)

10 Versions

  • 0.0.10                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago

Copyright 2014 - 2016 © taobao.org |