Commit 5237f904 authored by Grandschtroumpf's avatar Grandschtroumpf

FileManager exposes "switchFile"

parent bdf6b8dd
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
"yo-yoify": "^3.7.3" "yo-yoify": "^3.7.3"
}, },
"dependencies": { "dependencies": {
"remix-plugin": "0.0.2-alpha.6",
"http-server": "^0.11.1", "http-server": "^0.11.1",
"remix-plugin": "0.0.2-alpha.8",
"remixd": "0.1.8-alpha.6" "remixd": "0.1.8-alpha.6"
}, },
"repository": { "repository": {
......
...@@ -22,7 +22,7 @@ const profile = { ...@@ -22,7 +22,7 @@ const profile = {
// File System profile // File System profile
// - events: ['currentFileChanged'] // - events: ['currentFileChanged']
// - methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile'] // - methods: ['getFolder', 'getCurrentFile', 'getFile', 'setFile', 'switchFile']
class FileManager extends FileSystemApi { class FileManager extends FileSystemApi {
constructor (localRegistry) { constructor (localRegistry) {
...@@ -114,10 +114,7 @@ class FileManager extends FileSystemApi { ...@@ -114,10 +114,7 @@ class FileManager extends FileSystemApi {
} }
async getCurrentFile () { async getCurrentFile () {
const path = this.currentFile() return this.currentFile()
if (!path) throw new Error('no file selected')
console.log('Get current File', path)
return path
} }
getFile (path) { getFile (path) {
......
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