add close files to methods

pull/1585/head
bunsenstraat 3 years ago
parent 12e7c77537
commit 7f07fb477e
  1. 5
      apps/remix-ide/src/app/files/fileManager.js

@ -22,7 +22,7 @@ const profile = {
icon: 'assets/img/fileManager.webp', icon: 'assets/img/fileManager.webp',
permission: true, permission: true,
version: packageJson.version, version: packageJson.version,
methods: ['closeAllFiles', 'file', 'exists', 'open', 'writeFile', 'readFile', 'copyFile', 'copyDir', 'rename', 'mkdir', 'readdir', 'remove', 'getCurrentFile', 'getFile', 'getFolder', 'setFile', 'switchFile', 'refresh', 'getProviderOf', 'getProviderByName', 'getPathFromUrl', 'getUrlFromPath'], methods: ['closeAllFiles', 'closeFile', 'file', 'exists', 'open', 'writeFile', 'readFile', 'copyFile', 'copyDir', 'rename', 'mkdir', 'readdir', 'remove', 'getCurrentFile', 'getFile', 'getFolder', 'setFile', 'switchFile', 'refresh', 'getProviderOf', 'getProviderByName', 'getPathFromUrl', 'getUrlFromPath'],
kind: 'file-system' kind: 'file-system'
} }
const errorMsg = { const errorMsg = {
@ -508,6 +508,7 @@ class FileManager extends Plugin {
} }
_setFileInternal (path, content) { _setFileInternal (path, content) {
console.log(path, content)
const provider = this.fileProviderOf(path) const provider = this.fileProviderOf(path)
if (!provider) throw createError({ code: 'ENOENT', message: `${path} not available` }) if (!provider) throw createError({ code: 'ENOENT', message: `${path} not available` })
// TODO : Add permission // TODO : Add permission
@ -708,7 +709,9 @@ class FileManager extends Plugin {
} }
syncEditor (path) { syncEditor (path) {
console.log(path)
var currentFile = this._deps.config.get('currentFile') var currentFile = this._deps.config.get('currentFile')
console.log(currentFile, path)
if (path !== currentFile) return if (path !== currentFile) return
var provider = this.fileProviderOf(currentFile) var provider = this.fileProviderOf(currentFile)

Loading…
Cancel
Save