b.getNode(a,g)}functionca(a,b,c,d,e){I(c,e)&&C(b,c,d,e)}functionda(a,b,c,d,e){varf=a.openFiles[c];f?D(b,f,d,e):e(newXa.EBADF)}functionea(a,b,c,d,e,f,g){"function"==typeoff&&(g=f,f=null),I(c,g)&&A(b,c,d,e,f,g)}functionfa(a,b,c,d,e,f,g){"function"==typeoff&&(g=f,f=null);varh=a.openFiles[c];h?wa(h.flags).contains(Na)?B(b,h,d,e,f,g):g(newXa.EBADF("descriptor does not permit writing")):g(newXa.EBADF)}functionga(a,b,c,d,e){I(c,e)&&E(b,c,d,e)}functionha(a,b,c,d,e){varf=a.openFiles[c];f?wa(f.flags).contains(Na)?F(b,f,d,e):e(newXa.EBADF("descriptor does not permit writing")):e(newXa.EBADF)}functionia(a,b,c,d,e,f){functiong(a,b){a?f(a):b.size+d<0?f(newXa.EINVAL("resulting file offset would be negative")):(h.position=b.size+d,f(null,h.position))}varh=a.openFiles[c];h||f(newXa.EBADF),"SET"===e?d<0?f(newXa.EINVAL("resulting file offset would be negative")):(h.position=d,f(null,h.position)):"CUR"===e?h.position+d<0?f(newXa.EINVAL("resulting file offset would be negative")):(h.position+=d,f(null,h.position)):"END"===e?p(b,h,g):f(newXa.EINVAL("whence argument is not a proper value"))}functionja(a,b,c,d){I(c,d)&&t(b,c,d)}functionka(a,b,c,d,e,f){if(I(c,f)){varg=Date.now();d=d||g,e=e||g,y(b,c,d,e,f)}}functionla(a,b,c,d,e,f){varg=Date.now();d=d||g,e=e||g;varh=a.openFiles[c];h?wa(h.flags).contains(Na)?z(b,h,d,e,f):f(newXa.EBADF("descriptor does not permit writing")):f(newXa.EBADF)}functionma(a,b,c,d,e){I(c,e)&&(d=Z(d,"mode"))&&$(b,c,d,e)}functionna(a,b,c,d,e){if(d=Z(d,"mode")){varf=a.openFiles[c];f?wa(f.flags).contains(Na)?_(b,f,d,e):e(newXa.EBADF("descriptor does not permit writing")):e(newXa.EBADF)}}functionoa(a,b,c,d,e,f){if(I(c,f))returnY(d)?Y(e)?voidaa(b,c,d,e,f):f(newXa.EINVAL("gid must be a valid integer",e)):f(newXa.EINVAL("uid must be a valid integer",d))}functionpa(a,b,c,d,e,f){if(!Y(d))returnf(newXa.EINVAL("uid must be a valid integer",d));if(!Y(e))returnf(newXa.EINVAL("gid must be a valid integer",e));varg=a.openFiles[c];g?wa(g.flags).contains(Na)?ba(b,g,d,e,f):f(newXa.EBADF("descriptor does not permit writing")):f(newXa.EBADF)}functionqa(a,b,c,e,g){functionh(a,c){a?g(a):(y=c,d(b,e,y,{ctime:D},g))}functioni(a){a?g(a):b.getObject(x[C].id,h)}functionk(a){a?g(a):(u.id===w.id&&(v=x),deletev[B],b.putObject(u.data,v,i))}functionl(a){a?g(a):(x[C]=v[B],b.putObject(w.data,x,k))}functionm(a,c){a?g(a):(x=c,wa(x).has(C)?j(b,e,l):l())}functionn(a,c){a?g(a):(w=c,b.getObject(w.data,m))}functiono(a,c){a?g(a):(v=c,f(b,A,n))}functionp(a,c){a?g(a):(u=c,b.getObject(c.data,o))}functionq(a){a?g(a):s(b,c,g)}functiont(a,d){a?g(a):d.type===Fa?f(b,z,p):r(b,c,e,q)}if(I(c,g)&&I(e,g)){c=ya(c),e=ya(e);varu,v,w,x,y,z=xa.dirname(c),A=xa.dirname(c),B=xa.basename(c),C=xa.basename(e),D=Date.now();f(b,c,t)}}functionra(a,b,c,d,e,f){f=arguments[arguments.length-1],I(c,!0,f)&&I(d,f)&&u(b,c,d,f)}functionsa(a,b,c,d){I(c,d)&&v(b,c,d)}functionta(a,b,c,d){functione(b,e){if(b)d(b);else{varf=newab(c,e,a.name);d(null,f)}}I(c,d)&&q(b,c,e)}functionua(a,b,c,d,e){e=arguments[arguments.length-1],d=d||0,I(c,e)&&w(b,c,d,e)}functionva(a,b,c,d,e){e=arguments[arguments.length-1],d=d||0;varf=a.openFiles[c];f?wa(f.flags).contains(Na)?x(b,f,d,e):e(newXa.EBADF("descriptor does not permit writing")):e(newXa.EBADF)}varwa=a("../../lib/nodash.js"),xa=a("../path.js"),ya=xa.normalize,za=xa.dirname,Aa=xa.basename,Ba=xa.isAbsolute,Ca=xa.isNull,Da=a("../constants.js"),Ea=Da.NODE_TYPE_FILE,Fa=Da.NODE_TYPE_DIRECTORY,Ga=Da.NODE_TYPE_SYMBOLIC_LINK,Ha=Da.NODE_TYPE_META,Ia=(Da.DEFAULT_FILE_PERMISSIONS,Da.DEFAULT_DIR_PERMISSIONS,Da.FULL_READ_WRITE_EXEC_PERMISSIONS),Ja=Da.ROOT_DIRECTORY_NAME,Ka=Da.SUPER_NODE_ID,La=Da.SYMLOOP_MAX,Ma=Da.O_READ,Na=Da.O_WRITE,Oa=Da.O_CREATE,Pa=Da.O_EXCLUSIVE,Qa=(Da.O_TRUNCATE,Da.O_APPEND),Ra=Da.O_FLAGS,Sa=Da.XATTR_CREATE,Ta=Da.XATTR_REPLACE,Ua=Da.FS_NOMTIME,Va=Da.FS_NOCTIME,Wa=a("../encoding.js"),Xa=a("../errors.js"),Ya=a("../directory-entry.js"),Za=a("../open-file-description.js"),$a=a("../super-node.js"),_a=a("../node.js"),ab=a("../stats.js"),bb=a("../buffer.js"),cb=/^[0-7]+$/;b.exports={ensureRootDi