FileManager exposes "switchFile"

pull/3094/head
Grandschtroumpf 6 years ago
parent 2903cd85ea
commit 3a95b1a3b2
  1. 2
      package.json
  2. 7
      src/app/files/fileManager.js

@ -67,8 +67,8 @@
"yo-yoify": "^3.7.3"
},
"dependencies": {
"remix-plugin": "0.0.2-alpha.6",
"http-server": "^0.11.1",
"remix-plugin": "0.0.2-alpha.8",
"remixd": "0.1.8-alpha.6"
},
"repository": {

@ -22,7 +22,7 @@ const profile = {
// File System profile
// - events: ['currentFileChanged']
// - methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile']
// - methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile', 'switchFile']
class FileManager extends FileSystemApi {
constructor (localRegistry) {
@ -114,10 +114,7 @@ class FileManager extends FileSystemApi {
}
async getCurrentFile () {
const path = this.currentFile()
if (!path) throw new Error('no file selected')
console.log('Get current File', path)
return path
return this.currentFile()
}
getFile (path) {

Loading…
Cancel
Save