Case sensetive move

This commit is contained in:
2022-02-16 01:50:58 +03:00
parent be9b8a97dd
commit a8e120875d

25
output.js Normal file
View File

@@ -0,0 +1,25 @@
const fs = require('fs')
class Output {
constructor () {
this.content = ''
}
addLine (text) {
this.content += text + '\n'
}
submit () {
const filename = 'index.txt'
try {
fs.unlinkSync(filename)
} catch (error) {
console.error(error)
console.log('File probably doesnt exist')
}
fs.writeFileSync(filename, this.content)
}
}
module.exports = new Output()