writeTmpFileSync

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

Create a temporary file on the disk with the passed content and returns the path to it.

Params

  1. data*-Any

    The data to write in the file

  2. settings{}TWriteTmpFileSyncSettings

    Some settings to customize your temp file creation

Return

  1. -string

    The path to the created temporary file

Example

import { writeTmpFileSync } from '@blackbyte/sugar/fs';
const path = writeTmpFileSync('Hello World');

Settings

  1. path-String

    A path relative to the temp folder to store your file

Todo

  • testsnormal