Write a file to the filesystem.
npm install @wrote/write
@wrote/write is a package to write a file to the filesystem.
``sh`
yarn add -E @wrote/write
- Table Of Contents
- API
- async write(path: string, data?: string|Buffer)
- Copyright
The package is available by importing its default function:
`js`
import write from '@wrote/write'
path: string,
data?: string|Buffer,
): voidWrite data to a file on the filesystem.
`js
import write from '@wrote/write'
const Write = async (path) => {
await write(path, '> example-data')
console.log('Written data to %s:', path)
}
````
Written data to example/temp/example.txt:
> example-data
![]() | © Art Deco for Wrote 2019 | alt="Tech Nation Visa" /> | Tech Nation Visa Sucks |
|---|