|
|
@ -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) { |
|
|
@ -113,10 +113,9 @@ class FileManager extends FileSystemApi { |
|
|
|
return path ? path[1] : null |
|
|
|
return path ? path[1] : null |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async getCurrentFile () { |
|
|
|
getCurrentFile () { |
|
|
|
const path = this.currentFile() |
|
|
|
const path = this.currentFile() |
|
|
|
if (!path) throw new Error('no file selected') |
|
|
|
if (!path) throw new Error('No file selected') |
|
|
|
console.log('Get current File', path) |
|
|
|
|
|
|
|
return path |
|
|
|
return path |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|