writeFileSync

Type:Function
Status:stable
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs

Write a file. If don’t exist, will be created as well as the directory structure if needed… (sync)

Params

  1. path*-String

    The file path to write

  2. data*-String

    The data to write in the file

  3. options{}Object

    Options are what you’d pass to [fs.writeFileSync()](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)

Example

import { writeFileSync } from '@blackbyte/sugar/fs';
writeFileSync('my/cool/file.txt', 'Hello World');

Todo

  • testsnormal