mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 08:30:06 -04:00
Update file.js
This commit is contained in:
parent
0d24a12c8c
commit
9a9b8ba52f
1 changed files with 4 additions and 0 deletions
|
@ -48,6 +48,10 @@ file.write = function (filepath, data = '') {
|
|||
return fs.writeFile(path.resolve(filepath), data, { encoding: 'utf8' }).catch(console.error)
|
||||
}
|
||||
|
||||
file.writeSync = function (filepath, data = '') {
|
||||
return fs.writeFileSync(path.resolve(filepath), data, { encoding: 'utf8' })
|
||||
}
|
||||
|
||||
file.clear = async function (filepath) {
|
||||
if (await file.exists(filepath)) return file.write(filepath, '')
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue