mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
dataeditor api endpoints
This commit is contained in:
parent
3e4fda9974
commit
5ca0abbabf
8 changed files with 373 additions and 116 deletions
|
@ -11,6 +11,7 @@ export default {
|
|||
CopyFile,
|
||||
GetDateString,
|
||||
formatUrl,
|
||||
deleteFile: deleteFile,
|
||||
}
|
||||
|
||||
import fs from 'fs'
|
||||
|
@ -162,3 +163,11 @@ function AppendToFile(data: string, file: string): void {
|
|||
console.error(err)
|
||||
}
|
||||
}
|
||||
|
||||
function deleteFile(fname: string): Boolean {
|
||||
if (FileExists(fname)) {
|
||||
fs.unlinkSync(fname)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue