fs-writefile-promise

WebJar for fs-writefile-promise

License

License

ISC
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

fs-writefile-promise
Last Version

Last Version

1.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

fs-writefile-promise
WebJar for fs-writefile-promise
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/ahmadnassri/node-fs-writefile-promise

Download fs-writefile-promise

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/fs-writefile-promise/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>fs-writefile-promise</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/fs-writefile-promise/
implementation 'org.webjars.npm:fs-writefile-promise:1.0.3'
// https://jarcasting.com/artifacts/org.webjars.npm/fs-writefile-promise/
implementation ("org.webjars.npm:fs-writefile-promise:1.0.3")
'org.webjars.npm:fs-writefile-promise:jar:1.0.3'
<dependency org="org.webjars.npm" name="fs-writefile-promise" rev="1.0.3">
  <artifact name="fs-writefile-promise" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='fs-writefile-promise', version='1.0.3')
)
libraryDependencies += "org.webjars.npm" % "fs-writefile-promise" % "1.0.3"
[org.webjars.npm/fs-writefile-promise "1.0.3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : mkdirp-promise jar [1.0.0,2)
org.webjars.npm : pinkie-promise jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

fs.writeFile Promise

License version Build Status

Promise version of fs.writeFile:
Asynchronously writes data to a file, replacing the file if it already exists.

Install

npm install fs-writefile-promise

API

write(filename, data [, options])

  • filename: String
  • data String or Buffer
  • options: Object

Return: Object (Promise)

When it finishes, it will be fulfilled with the file name that was written to.

When it fails, it will be rejected with an error as its first argument.

write('/tmp/foo', 'bar')
  .then(filename => console.log(filename)) //=> '/tmp/foo'
  .catch(err => console.error(err))

options

The option object will be directly passed to fs.writeFile.


Author: Ahmad Nassri • Github: @ahmadnassri • Twitter: @AhmadNassri

Versions

Version
1.0.3