shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
writeTmpFile
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
- data*-Any
The data to write in the file
- settings{}TWriteTmpFileSettings
Some settings to customize your temp file creation
Return
- -Promise<string>
A promise that will be resolved when the writeTmpFile is completed with the path to it
Example
import { writeTmpFile } from '@blackbyte/sugar/fs';
writeTmpFile('Hello World').then((path) => {
// do something on complete...
});Settings
- path-String
A path relative to the temp folder to store your file
Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space