text: /**
   * skylark-browserfs - A version of browserfs that ported to running on skylarkjs.
   * @author 
   * @version v0.9.0
   * @link 
   * @license MIT
   */
  define(["../core/file_system","../libs/path","../core/api_error"],function(e,t,r){"use strict";const{BaseFileSystem:n}=e,{ApiError:i}=r;class s extends n{constructor(e,t){super(),this._folder=e,this._wrapped=t}static Create(e,t){const r=new s(e.folder,e.wrapped);r._initialize(function(e){e?t(e):t(null,r)})}static isAvailable(){return!0}getName(){return this._wrapped.getName()}isReadOnly(){return this._wrapped.isReadOnly()}supportsProps(){return this._wrapped.supportsProps()}supportsSynch(){return this._wrapped.supportsSynch()}supportsLinks(){return!1}_initialize(e){this._wrapped.exists(this._folder,t=>{t?e():this._wrapped.isReadOnly()?e(i.ENOENT(this._folder)):this._wrapped.mkdir(this._folder,511,e)})}}function p(e,r){if(null!==r&&"object"==typeof r){const n=r;let i=n.path;i&&(i="/"+t.relative(e,i),n.message=n.message.replace(n.path,i),n.path=i)}return r}function a(e,r,n){return"Sync"!==e.slice(e.length-4)?function(){var i,s;return arguments.length>0&&(r&&(arguments[0]=t.join(this._folder,arguments[0])),n&&(arguments[1]=t.join(this._folder,arguments[1])),arguments[arguments.length-1]=(i=this._folder,"function"==typeof(s=arguments[arguments.length-1])?function(e){arguments.length>0&&(arguments[0]=p(i,e)),s.apply(null,arguments)}:s)),this._wrapped[e].apply(this._wrapped,arguments)}:function(){try{return r&&(arguments[0]=t.join(this._folder,arguments[0])),n&&(arguments[1]=t.join(this._folder,arguments[1])),this._wrapped[e].apply(this._wrapped,arguments)}catch(e){throw p(this._folder,e)}}}return s.Name="FolderAdapter",s.Options={folder:{type:"string",description:"The folder to use as the root directory"},wrapped:{type:"object",description:"The file system to wrap"}},["diskSpace","stat","statSync","open","openSync","unlink","unlinkSync","rmdir","rmdirSync","mkdir","mkdirSync","readdir","readdirSync","exists","existsSync","realpath","realpathSync","truncate","truncateSync","readFile","readFileSync","writeFile","writeFileSync","appendFile","appendFileSync","chmod","chmodSync","chown","chownSync","utimes","utimesSync","readlink","readlinkSync"].forEach(e=>{s.prototype[e]=a(e,!0,!1)}),["rename","renameSync","link","linkSync","symlink","symlinkSync"].forEach(e=>{s.prototype[e]=a(e,!0,!0)}),s});
  //# sourceMappingURL=../sourcemaps/backend/FolderAdapter.js.map
  