Commit 5b2d3c51 authored by ioedeveloper's avatar ioedeveloper Committed by GitHub

Revert unused changes

parent 44f40f51
...@@ -100,18 +100,13 @@ class FileManager extends Plugin { ...@@ -100,18 +100,13 @@ class FileManager extends Plugin {
* @param {string} path path of the directory or file * @param {string} path path of the directory or file
* @returns {boolean} true if the path exists * @returns {boolean} true if the path exists
*/ */
async exists (path, type) { exists (path) {
const provider = this.fileProviderOf(path) const provider = this.fileProviderOf(path)
const result = await provider.exists(path, (err, result) => { const result = provider.exists(path, (err, result) => {
if (err) return false if (err) return false
return result return result
}) })
if (type === 'file') {
return result && await this.isFile(path)
} else if (type === 'folder') {
return result && await this.isDirectory(path)
}
return result return result
} }
......
...@@ -37,7 +37,6 @@ module.exports = { ...@@ -37,7 +37,6 @@ module.exports = {
() => { return exist }, () => { return exist },
(callback) => { (callback) => {
fileProvider.exists(name + counter + prefix + '.' + ext, (error, currentExist) => { fileProvider.exists(name + counter + prefix + '.' + ext, (error, currentExist) => {
console.log('currentExists: ', currentExist)
if (error) { if (error) {
callback(error) callback(error)
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment