PlatformFileSystem.js 1.3 KB

1234567891011121314151617181920212223242526
  1. export default class PlatformFileSystem{constructor(path,type){this._path=path;this._type=type;}
  2. getMetadata(path){return Promise.resolve((null));}
  3. initialFilePaths(){return[];}
  4. initialGitFolders(){return[];}
  5. path(){return this._path;}
  6. embedderPath(){throw new Error('Not implemented');}
  7. type(){return this._type;}
  8. async createFile(path,name){return Promise.resolve(null);}
  9. deleteFile(path){return Promise.resolve(false);}
  10. requestFileBlob(path){return Promise.resolve((null));}
  11. async requestFileContent(path){return{error:ls`Unable to read files with this implementation.`,isEncoded:false};}
  12. setFileContent(path,content,isBase64){throw new Error('Not implemented');}
  13. renameFile(path,newName,callback){callback(false);}
  14. addExcludedFolder(path){}
  15. removeExcludedFolder(path){}
  16. fileSystemRemoved(){}
  17. isFileExcluded(folderPath){return false;}
  18. excludedFolders(){return new Set();}
  19. searchInPath(query,progress){return Promise.resolve([]);}
  20. indexContent(progress){setImmediate(()=>progress.done());}
  21. mimeFromPath(path){throw new Error('Not implemented');}
  22. canExcludeFolder(path){return false;}
  23. contentType(path){throw new Error('Not implemented');}
  24. tooltipForURL(url){throw new Error('Not implemented');}
  25. supportsAutomapping(){throw new Error('Not implemented');}}
  26. self.Persistence=self.Persistence||{};Persistence=Persistence||{};Persistence.PlatformFileSystem=PlatformFileSystem;