make sharedfolder.exists async

pull/1/head
yann300 7 years ago
parent 99e127d3f4
commit ccdc138b9b
  1. 12
      src/app/files/shared-folder.js

@ -65,13 +65,11 @@ module.exports = class SharedFolder {
// //
// this.remixd.exists(path, (error, isValid) => {}) // this.remixd.exists(path, (error, isValid) => {})
exists (path) { exists (path, cb) {
// @TODO: add new remixd.exists() method var unprefixedpath = this.removePrefix(path)
// we remove the this.files = null at the beggining this._remixd.call('sharedfolder', 'exists', {path: unprefixedpath}, (error, result) => {
// modify the exists() (cause it is using the this.files) to use remixd cb(error, result)
// yes for the exists I think you might need another remixd function })
if (!this.files) return false
return this.files[path] !== undefined
} }
get (path, cb) { get (path, cb) {

Loading…
Cancel
Save