}functionu(n,i){n?r(n):i.mode!=we?r(newCe.ENOTDIR(null,e)):(p=i,t.getObject(p.data,s))}functions(t,n){t?r(t):(h=n,le(h).size()>0?r(newCe.ENOTEMPTY(null,e)):c())}functionf(e){if(e)r(e);else{vari=Date.now();n(t,E,g,{mtime:i,ctime:i},l)}}functionc(){deletev[m],t.putObject(g.data,v,f)}functionl(e){e?r(e):t.delete(p.id,d)}functiond(e){e?r(e):t.delete(p.data,r)}e=pe(e);varp,h,g,v,m=ge(e),E=he(e);i(t,E,o)}functionf(t,e,r,o){functiona(n,r){n?o(n):r.mode!==we?o(newCe.ENOENT(null,e)):(v=r,t.getObject(v.data,u))}functionu(n,i){n?o(n):(m=i,le(m).has(b)?le(r).contains(xe)?o(newCe.ENOENT("O_CREATE and O_EXCLUSIVE are set, and the named file exists",e)):(E=m[b],E.type==we&&le(r).contains(Se)?o(newCe.EISDIR("the named file is a directory and O_WRITE is set",e)):t.getObject(E.id,s)):le(r).contains(Ne)?l():o(newCe.ENOENT("O_CREATE is not set and the named file does not exist",e)))}functions(t,n){if(t)o(t);else{varr=n;r.mode==be?(O++,O>Te?o(newCe.ELOOP(null,e)):f(r.data)):c(void0,r)}}functionf(n){n=pe(n),I=he(n),b=ge(n),Oe==b&&(le(r).contains(Se)?o(newCe.EISDIR("the named file is a directory and O_WRITE is set",e)):i(t,e,c)),i(t,I,a)}functionc(t,e){t?o(t):(y=e,o(null,y))}functionl(){Ve.create({guid:t.guid,mode:ye},function(e,n){returne?(o(e),void0):(y=n,y.nlinks+=1,t.putObject(y.id,y,d),void0)})}functiond(e){e?o(e):(w=newXe(0),w.fill(0),t.putBuffer(y.data,w,h))}functionp(e){if(e)o(e);else{varr=Date.now();n(t,I,v,{mtime:r,ctime:r},g)}}functionh(e){e?o(e):(m[b]=newke(y.id,ye),t.putObject(v.data,m,p))}functiong(t){t?o(t):o(null,y)}e=pe(e);varv,m,E,y,w,b=ge(e),I=he(e),O=0;Oe==b?le(r).contains(Se)?o(newCe.EISDIR("the named file is a directory and O_WRITE is set",e)):i(t,e,c):i(t,I,a)}functionc(t,e,r,i,o,a){functionu(t){t?a(t):a(null,o)}functions(r){if(r)a(r);else{vari=Date.now();n(t,e.path,l,{mtime:i,ctime:i},u)}}functionf(e){e?a(e):t.putObject(l.id,l,s)}functionc(n,u){if(n)a(n);else{l=u;vars=newXe(o);s.fill(0),r.copy(s,0,i,i+o),e.position=o,l.size=o,l.version+=1,t.putBuffer(l.data,s,f)}}varl;t.getObject(e.id,c)}functionl(t,e,r,i,o,a,u){functions(t){t?u(t):u(null,o)}functionf(r){if(r)u(r);else{vari=Date.now();n(t,e.path,p,{mtime:i,ctime:i},s)}}functionc(e){e?u(e):t.putObject(p.id,p,f)}functionl(n,s){if(n)u(n);else{if(h=s,!h)returnu(newCe.EIO("Expected Buffer"));varf=void0!==a&&null!==a?a:e.position,l=Math.max(h.length,f+o),d=newXe(l);d.fill(0),h&&h.copy(d),r.copy(d,f,i,i+o),void0===a&&(e.position+=o),p.size=l,p.version+=1,t.putBuffer(p.data,d,c)}}functiond(e,n){e?u(e):(p=n,t.getBuffer(p.data,l))}varp,h;t.getObject(e.id,d)}functiond(t,e,n,r,i,o,a){functionu(t,u){if(t)a(t);else{if(c=u,!c)returna(newCe.EIO("Expected Buffer"));vars=void0!==o&&null!==o?o:e.position;i=s+i>n.length?i-s:i,c.copy(n,r,s,s+i),void0===o&&(e.position+=i),a(null,i)}}functions(e,n){e?a(e):(f=n,t.getBuffer(f.data,u))}varf,c;t.getObject(e.id,s)}functionp(t,e,n){e=pe(e),ge(e),i(t,e,n)}functionh(t,e,n){e.getNode(t,n)}functiong(t,e,n){functionr(e,r){e?n(e):(a=r,t.getObject(a.data,o))}functiono(r,i){r?n(r):(u=i,le(u).has(s)?t.getObject(u[s].id,n):n(newCe.ENOENT("a component of the path does not name an existing file",e)))}e=pe(e);vara,u,s=ge(e),f=he(e);Oe==s?i(t,e,n):i(t,f,r)}functionv(t,e,r,o){functiona(e){e?o(e):n(t,r,y,{ctime:Date.now()},o)}functionu(e,n){e?o(e):(y=n,y.nlinks+=1,t.putObject(y.id,y,a))}functions(e){e?o(e):t.getObject(E[w].id,u)}functionf(e,n){e?o(e):(E=n,le(E).has(w)?o(newCe.EEXIST("newpath resolves to an existing file",w)):(E[w]=v[p],t.putObject(m.data,E,s)))}functionc(e,n){e?o(e):(m=n,t.getObject(m.data,f))}functionl(e,n){e?o(e):(v=n,le(v).has(p)?i(t,b,c):o(newCe.ENOENT("a component of either path prefix does not exist",p)))}functiond(e,n){e?o(e):(g=n,t.getObject(g.data,l))}e=pe(e);varp=ge(e),h=he(e);r=pe(r);varg,v,m,E,y,w=ge(r),b=he(r);i(t,h,d)}functionm(t,e,r){functiono(e){e?r(e):(deleted[h],t.putObject(l.data,d,function(){vare=Date.now();n(t,g,l,{mtime:e,ctime:e},r)}))}functiona(e){e?r(e):t.delete(p.data,o)}functionu(i,u){i?r(i):(p=u,p.nlinks-=1,1>p.nlinks?t.delet