@ -569,6 +569,9 @@ function run () {
fileProvider: (name) => {
return self._api.filesProviders[name]
},
currentPath: function () {
return fileManager.currentPath()
getBalance: (address, callback) => {
udapp.getBalance(address, (error, balance) => {
if (error) {
@ -79,6 +79,13 @@ class FileManager {
this.refreshTabs()
}
currentPath () {
var currentFile = this.opt.config.get('currentFile')
var reg = /(.*\/).*/
var path = reg.exec(currentFile)
return path ? path[1] : null
fileRemovedEvent (path) {
if (path === this.opt.config.get('currentFile')) {
this.opt.config.set('currentFile', '')