Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
25
my-app/node_modules/karma/lib/utils/file-utils.js
generated
vendored
Executable file
25
my-app/node_modules/karma/lib/utils/file-utils.js
generated
vendored
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
|
||||
const FileUtils = {
|
||||
readFile (path) {
|
||||
return fs.readFileSync(path).toString()
|
||||
},
|
||||
|
||||
saveFile (path, content) {
|
||||
fs.writeFileSync(path, content)
|
||||
},
|
||||
|
||||
copyFile (src, dest) {
|
||||
FileUtils.saveFile(dest, FileUtils.readFile(src))
|
||||
},
|
||||
|
||||
removeFileIfExists (src) {
|
||||
if (fs.existsSync(src)) {
|
||||
fs.unlinkSync(src)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = FileUtils
|
||||
Loading…
Add table
Add a link
Reference in a new issue