core-files_fileinfo.mjs 841 B

12
  1. /*! third party licenses: dist/vendor.LICENSE.txt */
  2. (function(e){const n=function(t){const i=this;_.each(t,function(s,l){_.isFunction(s)||(i[l]=s)}),_.isUndefined(this.id)||(this.id=parseInt(t.id,10)),this.path=t.path||"",this.type==="dir"?this.mimetype="httpd/unix-directory":this.mimetype=this.mimetype||"application/octet-stream",this.type||(this.mimetype==="httpd/unix-directory"?this.type="dir":this.type="file")};n.prototype={id:null,name:null,path:null,mimetype:null,icon:null,type:null,permissions:null,mtime:null,etag:null,mountType:null,hasPreview:!0,sharePermissions:null,shareAttributes:[],quotaAvailableBytes:-1,canDownload:function(){for(const t in this.shareAttributes){const i=this.shareAttributes[t];if(i.scope==="permissions"&&i.key==="download")return i.enabled}return!0}},e.Files||(e.Files={}),e.Files.FileInfo=n})(OC);