diff --git a/assets/icons.js b/assets/icons.js new file mode 100644 index 00000000..b79c9e89 --- /dev/null +++ b/assets/icons.js @@ -0,0 +1,15 @@ +(function(svg) { + svg.innerHTML = ``; + svg.style.display = 'none'; + if (location.protocol === 'file:') { + if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', updateUseElements); + else updateUseElements() + function updateUseElements() { + document.querySelectorAll('use').forEach(el => { + if (el.getAttribute('href').includes('#icon-')) { + el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#')); + } + }); + } + } +})(document.body.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))) \ No newline at end of file diff --git a/assets/icons.svg b/assets/icons.svg new file mode 100644 index 00000000..7dead611 --- /dev/null +++ b/assets/icons.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/main.js b/assets/main.js index 7270cff8..1daeb690 100644 --- a/assets/main.js +++ b/assets/main.js @@ -1,8 +1,8 @@ "use strict"; -"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` - ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(B,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`,this.handleValueChange()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(e=>{e.style.display="block";let n=Array.from(e.querySelectorAll(".tsd-index-link")).every(r=>r.offsetParent==null);e.style.display=n?"none":"block"})}};var Z=class extends C{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +"use strict";(()=>{var Ce=Object.create;var ne=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Ce(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),y=s.str.charAt(1),p;y in s.node.edges?p=s.node.edges[y]:(p=new t.TokenSet,s.node.edges[y]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.scrollToHash(),this.updateIndexVisibility())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.scrollToHash(),this.updateIndexVisibility())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!e.checkVisibility()){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let y=document.createElement("li");y.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,y.append(p),e.appendChild(y)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var He={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>He[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",fe="mousemove",H="mouseup",J={x:0,y:0},pe=!1,ee=!1,Be=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(Be=!0,F="touchstart",fe="touchmove",H="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(fe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(H,()=>{ee=!1});document.addEventListener("click",t=>{pe&&(t.preventDefault(),t.stopImmediatePropagation(),pe=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(H,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(H,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ye=document.head.appendChild(document.createElement("style"));ye.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ye.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ve(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ve(t.value)})}function ve(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); /*! Bundled license information: lunr/lunr.js: diff --git a/assets/style.css b/assets/style.css index 98a43779..072daed8 100644 --- a/assets/style.css +++ b/assets/style.css @@ -405,7 +405,8 @@ dd { } body { background: var(--color-background); - font-family: "Segoe UI", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; color: var(--color-text); } diff --git a/classes/ipfs_unixfs.UnixFS.html b/classes/ipfs_unixfs.UnixFS.html index 186c8a96..a7089d24 100644 --- a/classes/ipfs_unixfs.UnixFS.html +++ b/classes/ipfs_unixfs.UnixFS.html @@ -1,20 +1,20 @@ -UnixFS | UnixFS

Constructors

Properties

_mode?: number
_originalMode: number
blockSizes: bigint[]
data?: Uint8Array
fanout?: bigint
hashType?: bigint
mtime?: Mtime
type: string

Accessors

  • get mode(): undefined | number
  • Returns undefined | number

  • set mode(mode): void
  • Parameters

    • mode: undefined | number

    Returns void

Methods

  • Parameters

    • size: bigint

    Returns void

  • Returns 0n for directories or data.length + sum(blockSizes) for everything else

    -

    Returns bigint

  • Returns boolean

  • Parameters

    • index: number

    Returns void

Generated using TypeDoc

\ No newline at end of file +UnixFS | UnixFS

Constructors

Properties

_mode?: number
_originalMode: number
blockSizes: bigint[]
data?: Uint8Array
fanout?: bigint
hashType?: bigint
mtime?: Mtime
type: string

Accessors

  • get mode(): undefined | number
  • Returns undefined | number

  • set mode(mode): void
  • Parameters

    • mode: undefined | number

    Returns void

Methods

  • Parameters

    • size: bigint

    Returns void

  • Returns 0n for directories or data.length + sum(blockSizes) for everything else

    +

    Returns bigint

  • Returns boolean

  • Parameters

    • index: number

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_exporter.exporter.html b/functions/ipfs_unixfs_exporter.exporter.html index 7846a7f0..a4791ec5 100644 --- a/functions/ipfs_unixfs_exporter.exporter.html +++ b/functions/ipfs_unixfs_exporter.exporter.html @@ -1,5 +1,5 @@ -exporter | UnixFS
  • Uses the given blockstore instance to fetch an IPFS node by a CID or path.

    +exporter | UnixFS
    • Uses the given blockstore instance to fetch an IPFS node by a CID or path.

      Returns a Promise which resolves to a UnixFSEntry.

      -

      Parameters

      Returns Promise<UnixFSEntry>

      Example

      import { exporter } from 'ipfs-unixfs-exporter'
      import { CID } from 'multiformats/cid'

      const cid = CID.parse('QmFoo')

      const entry = await exporter(cid, blockstore, {
      signal: AbortSignal.timeout(50000)
      })

      if (entry.type === 'file') {
      for await (const chunk of entry.content()) {
      // chunk is a Uint8Array
      }
      } +

      Parameters

      Returns Promise<UnixFSEntry>

      Example

      import { exporter } from 'ipfs-unixfs-exporter'
      import { CID } from 'multiformats/cid'

      const cid = CID.parse('QmFoo')

      const entry = await exporter(cid, blockstore, {
      signal: AbortSignal.timeout(50000)
      })

      if (entry.type === 'file') {
      for await (const chunk of entry.content()) {
      // chunk is a Uint8Array
      }
      }
      -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_exporter.recursive.html b/functions/ipfs_unixfs_exporter.recursive.html index 2755e409..643b9057 100644 --- a/functions/ipfs_unixfs_exporter.recursive.html +++ b/functions/ipfs_unixfs_exporter.recursive.html @@ -1,5 +1,5 @@ -recursive | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_exporter.walkPath.html b/functions/ipfs_unixfs_exporter.walkPath.html index e4aa69b4..b46f0e00 100644 --- a/functions/ipfs_unixfs_exporter.walkPath.html +++ b/functions/ipfs_unixfs_exporter.walkPath.html @@ -1,4 +1,4 @@ -walkPath | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.chunker.fixedSize.html b/functions/ipfs_unixfs_importer.chunker.fixedSize.html index 25032836..5a140197 100644 --- a/functions/ipfs_unixfs_importer.chunker.fixedSize.html +++ b/functions/ipfs_unixfs_importer.chunker.fixedSize.html @@ -1 +1 @@ -fixedSize | UnixFS

Generated using TypeDoc

\ No newline at end of file +fixedSize | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.chunker.rabin.html b/functions/ipfs_unixfs_importer.chunker.rabin.html index 26d5bd91..7e2a5e13 100644 --- a/functions/ipfs_unixfs_importer.chunker.rabin.html +++ b/functions/ipfs_unixfs_importer.chunker.rabin.html @@ -1 +1 @@ -rabin | UnixFS

Generated using TypeDoc

\ No newline at end of file +rabin | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.index.importByteStream.html b/functions/ipfs_unixfs_importer.index.importByteStream.html index c1c8ab28..d022518a 100644 --- a/functions/ipfs_unixfs_importer.index.importByteStream.html +++ b/functions/ipfs_unixfs_importer.index.importByteStream.html @@ -1,5 +1,5 @@ -importByteStream | UnixFS
  • importByteStream accepts a single stream of Uint8Arrays and +importByteStream | UnixFS

    • importByteStream accepts a single stream of Uint8Arrays and returns a promise of a single ImportResult.

      -

      Parameters

      Returns Promise<ImportResult>

      Example

      import { importByteStream } from 'ipfs-unixfs-importer'
      import { MemoryBlockstore } from 'blockstore-core'

      // store blocks in memory, other blockstores are available
      const blockstore = new MemoryBlockstore()

      const input = [
      Uint8Array.from([0, 1, 2, 3, 4]),
      Uint8Array.from([5, 6, 7, 8, 9])
      ]

      const entry = await importByteStream(input, blockstore) +

      Parameters

      Returns Promise<ImportResult>

      Example

      import { importByteStream } from 'ipfs-unixfs-importer'
      import { MemoryBlockstore } from 'blockstore-core'

      // store blocks in memory, other blockstores are available
      const blockstore = new MemoryBlockstore()

      const input = [
      Uint8Array.from([0, 1, 2, 3, 4]),
      Uint8Array.from([5, 6, 7, 8, 9])
      ]

      const entry = await importByteStream(input, blockstore)
      -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.index.importBytes.html b/functions/ipfs_unixfs_importer.index.importBytes.html index 93898cb8..8eafa19e 100644 --- a/functions/ipfs_unixfs_importer.index.importBytes.html +++ b/functions/ipfs_unixfs_importer.index.importBytes.html @@ -1,5 +1,5 @@ -importBytes | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.index.importDirectory.html b/functions/ipfs_unixfs_importer.index.importDirectory.html index f55bb25e..a73488c3 100644 --- a/functions/ipfs_unixfs_importer.index.importDirectory.html +++ b/functions/ipfs_unixfs_importer.index.importDirectory.html @@ -1,6 +1,6 @@ -importDirectory | UnixFS
  • importDir is similar to importer except it accepts a single +importDirectory | UnixFS

    • importDir is similar to importer except it accepts a single DirectoryCandidate and returns a promise of a single ImportResult instead of a stream of results.

      -

      Parameters

      Returns Promise<ImportResult>

      Example

      import { importDirectory } from 'ipfs-unixfs-importer'
      import { MemoryBlockstore } from 'blockstore-core'

      // store blocks in memory, other blockstores are available
      const blockstore = new MemoryBlockstore()

      const input: DirectoryCandidate = {
      path: './foo.txt'
      }

      const entry = await importDirectory(input, blockstore) +

      Parameters

      Returns Promise<ImportResult>

      Example

      import { importDirectory } from 'ipfs-unixfs-importer'
      import { MemoryBlockstore } from 'blockstore-core'

      // store blocks in memory, other blockstores are available
      const blockstore = new MemoryBlockstore()

      const input: DirectoryCandidate = {
      path: './foo.txt'
      }

      const entry = await importDirectory(input, blockstore)
      -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.index.importFile.html b/functions/ipfs_unixfs_importer.index.importFile.html index b54f68d6..d0d0e9a0 100644 --- a/functions/ipfs_unixfs_importer.index.importFile.html +++ b/functions/ipfs_unixfs_importer.index.importFile.html @@ -1,6 +1,6 @@ -importFile | UnixFS
  • importFile is similar to importer except it accepts a single +importFile | UnixFS

    • importFile is similar to importer except it accepts a single FileCandidate and returns a promise of a single ImportResult instead of a stream of results.

      -

      Parameters

      Returns Promise<ImportResult>

      Example

      import { importFile } from 'ipfs-unixfs-importer'
      import { MemoryBlockstore } from 'blockstore-core'

      // store blocks in memory, other blockstores are available
      const blockstore = new MemoryBlockstore()

      const input: FileCandidate = {
      path: './foo.txt',
      content: Uint8Array.from([0, 1, 2, 3, 4])
      }

      const entry = await importFile(input, blockstore) +

      Parameters

      Returns Promise<ImportResult>

      Example

      import { importFile } from 'ipfs-unixfs-importer'
      import { MemoryBlockstore } from 'blockstore-core'

      // store blocks in memory, other blockstores are available
      const blockstore = new MemoryBlockstore()

      const input: FileCandidate = {
      path: './foo.txt',
      content: Uint8Array.from([0, 1, 2, 3, 4])
      }

      const entry = await importFile(input, blockstore)
      -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.index.importer.html b/functions/ipfs_unixfs_importer.index.importer.html index e349823a..0a72e78c 100644 --- a/functions/ipfs_unixfs_importer.index.importer.html +++ b/functions/ipfs_unixfs_importer.index.importer.html @@ -1,5 +1,5 @@ -importer | UnixFS
  • The importer creates UnixFS DAGs and stores the blocks that make +importer | UnixFS

    • The importer creates UnixFS DAGs and stores the blocks that make them up in the passed blockstore.

      -

      Parameters

      Returns AsyncGenerator<ImportResult, void, unknown>

      Example

      import { importer } from 'ipfs-unixfs-importer'
      import { MemoryBlockstore } from 'blockstore-core'

      // store blocks in memory, other blockstores are available
      const blockstore = new MemoryBlockstore()

      const input = [{
      path: './foo.txt',
      content: Uint8Array.from([0, 1, 2, 3, 4])
      }, {
      path: './bar.txt',
      content: Uint8Array.from([0, 1, 2, 3, 4])
      }]

      for await (const entry of importer(input, blockstore)) {
      console.info(entry)
      // { cid: CID(), ... }
      } +

      Parameters

      Returns AsyncGenerator<ImportResult, void, unknown>

      Example

      import { importer } from 'ipfs-unixfs-importer'
      import { MemoryBlockstore } from 'blockstore-core'

      // store blocks in memory, other blockstores are available
      const blockstore = new MemoryBlockstore()

      const input = [{
      path: './foo.txt',
      content: Uint8Array.from([0, 1, 2, 3, 4])
      }, {
      path: './bar.txt',
      content: Uint8Array.from([0, 1, 2, 3, 4])
      }]

      for await (const entry of importer(input, blockstore)) {
      console.info(entry)
      // { cid: CID(), ... }
      }
      -

    Generated using TypeDoc

    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.layout.balanced.html b/functions/ipfs_unixfs_importer.layout.balanced.html index 15c69eb8..88e4bfa3 100644 --- a/functions/ipfs_unixfs_importer.layout.balanced.html +++ b/functions/ipfs_unixfs_importer.layout.balanced.html @@ -1 +1 @@ -balanced | UnixFS

Generated using TypeDoc

\ No newline at end of file +balanced | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.layout.flat.html b/functions/ipfs_unixfs_importer.layout.flat.html index fc79e98a..8db34c7c 100644 --- a/functions/ipfs_unixfs_importer.layout.flat.html +++ b/functions/ipfs_unixfs_importer.layout.flat.html @@ -1 +1 @@ -flat | UnixFS

Generated using TypeDoc

\ No newline at end of file +flat | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/ipfs_unixfs_importer.layout.trickle.html b/functions/ipfs_unixfs_importer.layout.trickle.html index 7558c77a..c5bc6e3e 100644 --- a/functions/ipfs_unixfs_importer.layout.trickle.html +++ b/functions/ipfs_unixfs_importer.layout.trickle.html @@ -1,2 +1,2 @@ -trickle | UnixFS

Generated using TypeDoc

\ No newline at end of file +trickle | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/hierarchy.html b/hierarchy.html index f46cee0c..4913d45e 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -1 +1 @@ -UnixFS

Generated using TypeDoc

\ No newline at end of file +UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/index.html b/index.html index fbf44b84..826eb997 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ -UnixFS

UnixFS

ipfs.tech +UnixFS

UnixFS

ipfs.tech Discuss codecov CI

@@ -24,4 +24,4 @@

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs.Mtime.html b/interfaces/ipfs_unixfs.Mtime.html index f10b3bac..06625373 100644 --- a/interfaces/ipfs_unixfs.Mtime.html +++ b/interfaces/ipfs_unixfs.Mtime.html @@ -1,3 +1,3 @@ -Mtime | UnixFS

Interface Mtime

interface Mtime {
    nsecs?: number;
    secs: bigint;
}

Properties

Properties

nsecs?: number
secs: bigint

Generated using TypeDoc

\ No newline at end of file +Mtime | UnixFS

Interface Mtime

interface Mtime {
    nsecs?: number;
    secs: bigint;
}

Properties

Properties

nsecs?: number
secs: bigint

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs.UnixFSOptions.html b/interfaces/ipfs_unixfs.UnixFSOptions.html index bbd0d3fc..63454fb7 100644 --- a/interfaces/ipfs_unixfs.UnixFSOptions.html +++ b/interfaces/ipfs_unixfs.UnixFSOptions.html @@ -1,8 +1,8 @@ -UnixFSOptions | UnixFS

Interface UnixFSOptions

interface UnixFSOptions {
    blockSizes?: bigint[];
    data?: Uint8Array;
    fanout?: bigint;
    hashType?: bigint;
    mode?: number;
    mtime?: Mtime;
    type?: string;
}

Properties

blockSizes?: bigint[]
data?: Uint8Array
fanout?: bigint
hashType?: bigint
mode?: number
mtime?: Mtime
type?: string

Generated using TypeDoc

\ No newline at end of file +UnixFSOptions | UnixFS

Interface UnixFSOptions

interface UnixFSOptions {
    blockSizes?: bigint[];
    data?: Uint8Array;
    fanout?: bigint;
    hashType?: bigint;
    mode?: number;
    mtime?: Mtime;
    type?: string;
}

Properties

blockSizes?: bigint[]
data?: Uint8Array
fanout?: bigint
hashType?: bigint
mode?: number
mtime?: Mtime
type?: string

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.ExportProgress.html b/interfaces/ipfs_unixfs_exporter.ExportProgress.html index 2bc34638..cfc78814 100644 --- a/interfaces/ipfs_unixfs_exporter.ExportProgress.html +++ b/interfaces/ipfs_unixfs_exporter.ExportProgress.html @@ -1,11 +1,11 @@ -ExportProgress | UnixFS
interface ExportProgress {
    bytesRead: bigint;
    fileSize: bigint;
    totalBytes: bigint;
}

Properties

bytesRead: bigint

How many bytes of the file have been read

-
fileSize: bigint

The size of the file being read - n.b. this may be +ExportProgress | UnixFS

interface ExportProgress {
    bytesRead: bigint;
    fileSize: bigint;
    totalBytes: bigint;
}

Properties

bytesRead: bigint

How many bytes of the file have been read

+
fileSize: bigint

The size of the file being read - n.b. this may be larger than total if offset/length has been specified

-
totalBytes: bigint

How many bytes of the file will be read - n.b. this may be +

totalBytes: bigint

How many bytes of the file will be read - n.b. this may be smaller than fileSize if offset/length have been specified

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.ExportWalk.html b/interfaces/ipfs_unixfs_exporter.ExportWalk.html index 1b9173c1..7c9c54b0 100644 --- a/interfaces/ipfs_unixfs_exporter.ExportWalk.html +++ b/interfaces/ipfs_unixfs_exporter.ExportWalk.html @@ -1,2 +1,2 @@ -ExportWalk | UnixFS
interface ExportWalk {
    cid: CID<unknown, number, number, Version>;
}

Properties

cid -

Properties

cid: CID<unknown, number, number, Version>

Generated using TypeDoc

\ No newline at end of file +ExportWalk | UnixFS
interface ExportWalk {
    cid: CID<unknown, number, number, Version>;
}

Properties

cid +

Properties

cid: CID<unknown, number, number, Version>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.Exportable.html b/interfaces/ipfs_unixfs_exporter.Exportable.html index 5a84c86c..9b580874 100644 --- a/interfaces/ipfs_unixfs_exporter.Exportable.html +++ b/interfaces/ipfs_unixfs_exporter.Exportable.html @@ -1,22 +1,22 @@ -Exportable | UnixFS
interface Exportable<T> {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    path: string;
    size: bigint;
    type: "object" | "file" | "directory" | "raw" | "identity";
    content(options?): AsyncGenerator<T, void, unknown>;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

-
depth: number

How far down the DAG the entry is

-
name: string

The name of the entry

-
path: string

The path of the entry within the DAG in which it was encountered

-
size: bigint

The size of the entry

-
type: "object" | "file" | "directory" | "raw" | "identity"

A disambiguator to allow TypeScript to work out the type of the entry.

+Exportable | UnixFS
interface Exportable<T> {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    path: string;
    size: bigint;
    type: "object" | "file" | "directory" | "raw" | "identity";
    content(options?): AsyncGenerator<T, void, unknown>;
}

Type Parameters

  • T

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

+
depth: number

How far down the DAG the entry is

+
name: string

The name of the entry

+
path: string

The path of the entry within the DAG in which it was encountered

+
size: bigint

The size of the entry

+
type: "object" | "file" | "directory" | "raw" | "identity"

A disambiguator to allow TypeScript to work out the type of the entry.

Example

if (entry.type === 'file') {
// access UnixFSFile properties safely
}

if (entry.type === 'directory') {
// access UnixFSDirectory properties safely
}
-

Methods

Methods

  • Parameters

    Returns AsyncGenerator<T, void, unknown>

    Example: File content

    When entry is a file or a raw node, offset and/or length arguments can be passed to entry.content() to return slices of data:

    const length = 5
    const data = new Uint8Array(length)
    let offset = 0

    for await (const chunk of entry.content({
    offset: 0,
    length
    })) {
    data.set(chunk, offset)
    offset += chunk.length
    }

    // `data` contains the first 5 bytes of the file
    return data

    Example: Directory content

    If entry is a directory, passing offset and/or length to entry.content() will limit the number of files returned from the directory.

    const entries = []

    for await (const entry of dir.content({
    offset: 0,
    length: 5
    })) {
    entries.push(entry)
    }

    // `entries` contains the first 5 files/directories in the directory
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.ExporterOptions.html b/interfaces/ipfs_unixfs_exporter.ExporterOptions.html index cba2ba80..bc31cf09 100644 --- a/interfaces/ipfs_unixfs_exporter.ExporterOptions.html +++ b/interfaces/ipfs_unixfs_exporter.ExporterOptions.html @@ -1,23 +1,23 @@ -ExporterOptions | UnixFS
interface ExporterOptions {
    blockReadConcurrency?: number;
    length?: number;
    offset?: number;
    onProgress?: ((evt) => void);
    signal?: AbortSignal;
}

Hierarchy

Properties

blockReadConcurrency?: number

When a DAG layer is encountered, all child nodes are loaded in parallel but +ExporterOptions | UnixFS

interface ExporterOptions {
    blockReadConcurrency?: number;
    length?: number;
    offset?: number;
    onProgress?: ((evt) => void);
    signal?: AbortSignal;
}

Hierarchy

Properties

blockReadConcurrency?: number

When a DAG layer is encountered, all child nodes are loaded in parallel but processed as they arrive. This allows us to load sibling nodes in advance of yielding their bytes. Pass a value here to control the number of blocks loaded in parallel. If a strict depth-first traversal is required, this value should be set to 1, otherwise the traversal order will tend to resemble a breadth-first fan-out and yield a have stable ordering. (default: undefined)

-
length?: number

An optional length to read.

+
length?: number

An optional length to read.

If the CID resolves to a file this will be the number of bytes read from the file, otherwise if it's a directory it will be the number of directory entries read from the directory listing. (default: undefined)

-
offset?: number

An optional offset to start reading at.

+
offset?: number

An optional offset to start reading at.

If the CID resolves to a file this will be a byte offset within that file, otherwise if it's a directory it will be a directory entry offset within the directory listing. (default: undefined)

-
onProgress?: ((evt) => void)

Type declaration

signal?: AbortSignal

This signal can be used to abort any long-lived operations such as fetching +

onProgress?: ((evt) => void)

Type declaration

signal?: AbortSignal

This signal can be used to abort any long-lived operations such as fetching blocks from the network. (default: undefined)

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.IdentityNode.html b/interfaces/ipfs_unixfs_exporter.IdentityNode.html index 628ef59d..08bcd2f3 100644 --- a/interfaces/ipfs_unixfs_exporter.IdentityNode.html +++ b/interfaces/ipfs_unixfs_exporter.IdentityNode.html @@ -1,26 +1,26 @@ -IdentityNode | UnixFS

Entries with a identity codec CID return identity entries.

+IdentityNode | UnixFS

Entries with a identity codec CID return identity entries.

These are entries where the data payload is stored in the CID itself, otherwise they are identical to RawNodes.

-
interface IdentityNode {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: Uint8Array;
    path: string;
    size: bigint;
    type: "identity";
    content(options?): AsyncGenerator<Uint8Array, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

-
depth: number

How far down the DAG the entry is

-
name: string

The name of the entry

-
path: string

The path of the entry within the DAG in which it was encountered

-
size: bigint

The size of the entry

-
type: "identity"

A disambiguator to allow TypeScript to work out the type of the entry.

+
interface IdentityNode {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: Uint8Array;
    path: string;
    size: bigint;
    type: "identity";
    content(options?): AsyncGenerator<Uint8Array, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

+
depth: number

How far down the DAG the entry is

+
name: string

The name of the entry

+
path: string

The path of the entry within the DAG in which it was encountered

+
size: bigint

The size of the entry

+
type: "identity"

A disambiguator to allow TypeScript to work out the type of the entry.

Example

if (entry.type === 'file') {
// access UnixFSFile properties safely
}

if (entry.type === 'directory') {
// access UnixFSDirectory properties safely
}
-

Methods

Methods

  • Parameters

    Returns AsyncGenerator<Uint8Array, void, unknown>

    Example: File content

    When entry is a file or a raw node, offset and/or length arguments can be passed to entry.content() to return slices of data:

    const length = 5
    const data = new Uint8Array(length)
    let offset = 0

    for await (const chunk of entry.content({
    offset: 0,
    length
    })) {
    data.set(chunk, offset)
    offset += chunk.length
    }

    // `data` contains the first 5 bytes of the file
    return data

    Example: Directory content

    If entry is a directory, passing offset and/or length to entry.content() will limit the number of files returned from the directory.

    const entries = []

    for await (const entry of dir.content({
    offset: 0,
    length: 5
    })) {
    entries.push(entry)
    }

    // `entries` contains the first 5 files/directories in the directory
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.NextResult.html b/interfaces/ipfs_unixfs_exporter.NextResult.html index 715dd9ab..f130e08d 100644 --- a/interfaces/ipfs_unixfs_exporter.NextResult.html +++ b/interfaces/ipfs_unixfs_exporter.NextResult.html @@ -1,5 +1,5 @@ -NextResult | UnixFS
interface NextResult {
    cid: CID<unknown, number, number, Version>;
    name: string;
    path: string;
    toResolve: string[];
}

Properties

Properties

cid: CID<unknown, number, number, Version>
name: string
path: string
toResolve: string[]

Generated using TypeDoc

\ No newline at end of file +NextResult | UnixFS
interface NextResult {
    cid: CID<unknown, number, number, Version>;
    name: string;
    path: string;
    toResolve: string[];
}

Properties

Properties

cid: CID<unknown, number, number, Version>
name: string
path: string
toResolve: string[]

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.ObjectNode.html b/interfaces/ipfs_unixfs_exporter.ObjectNode.html index 264c0614..5cb695a7 100644 --- a/interfaces/ipfs_unixfs_exporter.ObjectNode.html +++ b/interfaces/ipfs_unixfs_exporter.ObjectNode.html @@ -1,24 +1,24 @@ -ObjectNode | UnixFS

Entries with a dag-cbor or dag-json codec CID return JavaScript object entries

-
interface ObjectNode {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: Uint8Array;
    path: string;
    size: bigint;
    type: "object";
    content(options?): AsyncGenerator<any, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

-
depth: number

How far down the DAG the entry is

-
name: string

The name of the entry

-
path: string

The path of the entry within the DAG in which it was encountered

-
size: bigint

The size of the entry

-
type: "object"

A disambiguator to allow TypeScript to work out the type of the entry.

+ObjectNode | UnixFS

Entries with a dag-cbor or dag-json codec CID return JavaScript object entries

+
interface ObjectNode {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: Uint8Array;
    path: string;
    size: bigint;
    type: "object";
    content(options?): AsyncGenerator<any, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

+
depth: number

How far down the DAG the entry is

+
name: string

The name of the entry

+
path: string

The path of the entry within the DAG in which it was encountered

+
size: bigint

The size of the entry

+
type: "object"

A disambiguator to allow TypeScript to work out the type of the entry.

Example

if (entry.type === 'file') {
// access UnixFSFile properties safely
}

if (entry.type === 'directory') {
// access UnixFSDirectory properties safely
}
-

Methods

Methods

  • Parameters

    Returns AsyncGenerator<any, void, unknown>

    Example: File content

    When entry is a file or a raw node, offset and/or length arguments can be passed to entry.content() to return slices of data:

    const length = 5
    const data = new Uint8Array(length)
    let offset = 0

    for await (const chunk of entry.content({
    offset: 0,
    length
    })) {
    data.set(chunk, offset)
    offset += chunk.length
    }

    // `data` contains the first 5 bytes of the file
    return data

    Example: Directory content

    If entry is a directory, passing offset and/or length to entry.content() will limit the number of files returned from the directory.

    const entries = []

    for await (const entry of dir.content({
    offset: 0,
    length: 5
    })) {
    entries.push(entry)
    }

    // `entries` contains the first 5 files/directories in the directory
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.RawNode.html b/interfaces/ipfs_unixfs_exporter.RawNode.html index 934c03b8..2ba0eb63 100644 --- a/interfaces/ipfs_unixfs_exporter.RawNode.html +++ b/interfaces/ipfs_unixfs_exporter.RawNode.html @@ -1,28 +1,28 @@ -RawNode | UnixFS

Entries with a raw codec CID return raw entries.

+RawNode | UnixFS

Entries with a raw codec CID return raw entries.

entry.content() returns an async iterator that yields a buffer containing the node content:

for await (const chunk of entry.content()) {
// chunk is a Buffer
}

Unless you an options object containing offset and length keys as an argument to entry.content(), chunk will be equal to entry.node.

-
interface RawNode {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: Uint8Array;
    path: string;
    size: bigint;
    type: "raw";
    content(options?): AsyncGenerator<Uint8Array, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

-
depth: number

How far down the DAG the entry is

-
name: string

The name of the entry

-
path: string

The path of the entry within the DAG in which it was encountered

-
size: bigint

The size of the entry

-
type: "raw"

A disambiguator to allow TypeScript to work out the type of the entry.

+
interface RawNode {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: Uint8Array;
    path: string;
    size: bigint;
    type: "raw";
    content(options?): AsyncGenerator<Uint8Array, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

+
depth: number

How far down the DAG the entry is

+
name: string

The name of the entry

+
path: string

The path of the entry within the DAG in which it was encountered

+
size: bigint

The size of the entry

+
type: "raw"

A disambiguator to allow TypeScript to work out the type of the entry.

Example

if (entry.type === 'file') {
// access UnixFSFile properties safely
}

if (entry.type === 'directory') {
// access UnixFSDirectory properties safely
}
-

Methods

Methods

  • Parameters

    Returns AsyncGenerator<Uint8Array, void, unknown>

    Example: File content

    When entry is a file or a raw node, offset and/or length arguments can be passed to entry.content() to return slices of data:

    const length = 5
    const data = new Uint8Array(length)
    let offset = 0

    for await (const chunk of entry.content({
    offset: 0,
    length
    })) {
    data.set(chunk, offset)
    offset += chunk.length
    }

    // `data` contains the first 5 bytes of the file
    return data

    Example: Directory content

    If entry is a directory, passing offset and/or length to entry.content() will limit the number of files returned from the directory.

    const entries = []

    for await (const entry of dir.content({
    offset: 0,
    length: 5
    })) {
    entries.push(entry)
    }

    // `entries` contains the first 5 files/directories in the directory
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.Resolve.html b/interfaces/ipfs_unixfs_exporter.Resolve.html index 5afd4d43..1454dcbd 100644 --- a/interfaces/ipfs_unixfs_exporter.Resolve.html +++ b/interfaces/ipfs_unixfs_exporter.Resolve.html @@ -1 +1 @@ -Resolve | UnixFS
interface Resolve ((cid, name, path, toResolve, depth, blockstore, options) => Promise<ResolveResult>)

Generated using TypeDoc

\ No newline at end of file +Resolve | UnixFS
interface Resolve ((cid, name, path, toResolve, depth, blockstore, options) => Promise<ResolveResult>)

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.ResolveResult.html b/interfaces/ipfs_unixfs_exporter.ResolveResult.html index 75ba1764..135b20a4 100644 --- a/interfaces/ipfs_unixfs_exporter.ResolveResult.html +++ b/interfaces/ipfs_unixfs_exporter.ResolveResult.html @@ -1,3 +1,3 @@ -ResolveResult | UnixFS
interface ResolveResult {
    entry: UnixFSEntry;
    next?: NextResult;
}

Properties

Properties

next?: NextResult

Generated using TypeDoc

\ No newline at end of file +ResolveResult | UnixFS
interface ResolveResult {
    entry: UnixFSEntry;
    next?: NextResult;
}

Properties

Properties

next?: NextResult

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.Resolver.html b/interfaces/ipfs_unixfs_exporter.Resolver.html index 3aa8712a..c7bffecf 100644 --- a/interfaces/ipfs_unixfs_exporter.Resolver.html +++ b/interfaces/ipfs_unixfs_exporter.Resolver.html @@ -1 +1 @@ -Resolver | UnixFS
interface Resolver ((cid, name, path, toResolve, resolve, depth, blockstore, options) => Promise<ResolveResult>)

Generated using TypeDoc

\ No newline at end of file +Resolver | UnixFS
interface Resolver ((cid, name, path, toResolve, resolve, depth, blockstore, options) => Promise<ResolveResult>)

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.ShardTraversalContext.html b/interfaces/ipfs_unixfs_exporter.ShardTraversalContext.html index 4a56f0fa..aee923c5 100644 --- a/interfaces/ipfs_unixfs_exporter.ShardTraversalContext.html +++ b/interfaces/ipfs_unixfs_exporter.ShardTraversalContext.html @@ -1,4 +1,4 @@ -ShardTraversalContext | UnixFS
interface ShardTraversalContext {
    hamtDepth: number;
    lastBucket: Bucket<boolean>;
    rootBucket: Bucket<boolean>;
}

Properties

hamtDepth: number
lastBucket: Bucket<boolean>
rootBucket: Bucket<boolean>

Generated using TypeDoc

\ No newline at end of file +ShardTraversalContext | UnixFS
interface ShardTraversalContext {
    hamtDepth: number;
    lastBucket: Bucket<boolean>;
    rootBucket: Bucket<boolean>;
}

Properties

hamtDepth: number
lastBucket: Bucket<boolean>
rootBucket: Bucket<boolean>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.UnixFSDirectory.html b/interfaces/ipfs_unixfs_exporter.UnixFSDirectory.html index a78b3e1b..40cf97a9 100644 --- a/interfaces/ipfs_unixfs_exporter.UnixFSDirectory.html +++ b/interfaces/ipfs_unixfs_exporter.UnixFSDirectory.html @@ -1,27 +1,27 @@ -UnixFSDirectory | UnixFS

If the entry is a directory, entry.content() returns further entry objects:

+UnixFSDirectory | UnixFS

If the entry is a directory, entry.content() returns further entry objects:

if (entry.type === 'directory') {
for await (const entry of dir.content()) {
console.info(entry.name)
}
}
-
interface UnixFSDirectory {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: PBNode;
    path: string;
    size: bigint;
    type: "directory";
    unixfs: UnixFS;
    content(options?): AsyncGenerator<UnixFSEntry, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

-
depth: number

How far down the DAG the entry is

-
name: string

The name of the entry

-
node: PBNode
path: string

The path of the entry within the DAG in which it was encountered

-
size: bigint

The size of the entry

-
type: "directory"

A disambiguator to allow TypeScript to work out the type of the entry.

+
interface UnixFSDirectory {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: PBNode;
    path: string;
    size: bigint;
    type: "directory";
    unixfs: UnixFS;
    content(options?): AsyncGenerator<UnixFSEntry, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

+
depth: number

How far down the DAG the entry is

+
name: string

The name of the entry

+
node: PBNode
path: string

The path of the entry within the DAG in which it was encountered

+
size: bigint

The size of the entry

+
type: "directory"

A disambiguator to allow TypeScript to work out the type of the entry.

Example

if (entry.type === 'file') {
// access UnixFSFile properties safely
}

if (entry.type === 'directory') {
// access UnixFSDirectory properties safely
}
-
unixfs: UnixFS

Methods

unixfs: UnixFS

Methods

  • Parameters

    Returns AsyncGenerator<UnixFSEntry, void, unknown>

    Example: File content

    When entry is a file or a raw node, offset and/or length arguments can be passed to entry.content() to return slices of data:

    const length = 5
    const data = new Uint8Array(length)
    let offset = 0

    for await (const chunk of entry.content({
    offset: 0,
    length
    })) {
    data.set(chunk, offset)
    offset += chunk.length
    }

    // `data` contains the first 5 bytes of the file
    return data

    Example: Directory content

    If entry is a directory, passing offset and/or length to entry.content() will limit the number of files returned from the directory.

    const entries = []

    for await (const entry of dir.content({
    offset: 0,
    length: 5
    })) {
    entries.push(entry)
    }

    // `entries` contains the first 5 files/directories in the directory
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.UnixFSFile.html b/interfaces/ipfs_unixfs_exporter.UnixFSFile.html index 6893c2e8..87939704 100644 --- a/interfaces/ipfs_unixfs_exporter.UnixFSFile.html +++ b/interfaces/ipfs_unixfs_exporter.UnixFSFile.html @@ -1,27 +1,27 @@ -UnixFSFile | UnixFS

If the entry is a file, entry.content() returns an async iterator that yields one or more Uint8Arrays containing the file content:

+UnixFSFile | UnixFS

If the entry is a file, entry.content() returns an async iterator that yields one or more Uint8Arrays containing the file content:

if (entry.type === 'file') {
for await (const chunk of entry.content()) {
// chunk is a Buffer
}
}
-
interface UnixFSFile {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: PBNode;
    path: string;
    size: bigint;
    type: "file";
    unixfs: UnixFS;
    content(options?): AsyncGenerator<Uint8Array, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

-
depth: number

How far down the DAG the entry is

-
name: string

The name of the entry

-
node: PBNode
path: string

The path of the entry within the DAG in which it was encountered

-
size: bigint

The size of the entry

-
type: "file"

A disambiguator to allow TypeScript to work out the type of the entry.

+
interface UnixFSFile {
    cid: CID<unknown, number, number, Version>;
    depth: number;
    name: string;
    node: PBNode;
    path: string;
    size: bigint;
    type: "file";
    unixfs: UnixFS;
    content(options?): AsyncGenerator<Uint8Array, void, unknown>;
}

Hierarchy (view full)

Properties

Methods

Properties

cid: CID<unknown, number, number, Version>

The CID of the entry

+
depth: number

How far down the DAG the entry is

+
name: string

The name of the entry

+
node: PBNode
path: string

The path of the entry within the DAG in which it was encountered

+
size: bigint

The size of the entry

+
type: "file"

A disambiguator to allow TypeScript to work out the type of the entry.

Example

if (entry.type === 'file') {
// access UnixFSFile properties safely
}

if (entry.type === 'directory') {
// access UnixFSDirectory properties safely
}
-
unixfs: UnixFS

Methods

unixfs: UnixFS

Methods

  • Parameters

    Returns AsyncGenerator<Uint8Array, void, unknown>

    Example: File content

    When entry is a file or a raw node, offset and/or length arguments can be passed to entry.content() to return slices of data:

    const length = 5
    const data = new Uint8Array(length)
    let offset = 0

    for await (const chunk of entry.content({
    offset: 0,
    length
    })) {
    data.set(chunk, offset)
    offset += chunk.length
    }

    // `data` contains the first 5 bytes of the file
    return data

    Example: Directory content

    If entry is a directory, passing offset and/or length to entry.content() will limit the number of files returned from the directory.

    const entries = []

    for await (const entry of dir.content({
    offset: 0,
    length: 5
    })) {
    entries.push(entry)
    }

    // `entries` contains the first 5 files/directories in the directory
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_exporter.UnixfsV1Resolver.html b/interfaces/ipfs_unixfs_exporter.UnixfsV1Resolver.html index 296793b4..926cd646 100644 --- a/interfaces/ipfs_unixfs_exporter.UnixfsV1Resolver.html +++ b/interfaces/ipfs_unixfs_exporter.UnixfsV1Resolver.html @@ -1 +1 @@ -UnixfsV1Resolver | UnixFS
interface UnixfsV1Resolver ((cid, node, unixfs, path, resolve, depth, blockstore) => ((options) => UnixfsV1Content))

Generated using TypeDoc

\ No newline at end of file +UnixfsV1Resolver | UnixFS
interface UnixfsV1Resolver ((cid, node, unixfs, path, resolve, depth, blockstore) => ((options) => UnixfsV1Content))

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.chunker.Chunker.html b/interfaces/ipfs_unixfs_importer.chunker.Chunker.html index 6f6fb925..b8eefa8b 100644 --- a/interfaces/ipfs_unixfs_importer.chunker.Chunker.html +++ b/interfaces/ipfs_unixfs_importer.chunker.Chunker.html @@ -1 +1 @@ -Chunker | UnixFS
interface Chunker ((source) => AsyncIterable<Uint8Array>)

Generated using TypeDoc

\ No newline at end of file +Chunker | UnixFS
interface Chunker ((source) => AsyncIterable<Uint8Array>)

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.BufferImporter.html b/interfaces/ipfs_unixfs_importer.index.BufferImporter.html index 87bf3234..6947aa5a 100644 --- a/interfaces/ipfs_unixfs_importer.index.BufferImporter.html +++ b/interfaces/ipfs_unixfs_importer.index.BufferImporter.html @@ -1 +1 @@ -BufferImporter | UnixFS
interface BufferImporter ((file, blockstore) => AsyncIterable<(() => Promise<BufferImporterResult>)>)

Generated using TypeDoc

\ No newline at end of file +BufferImporter | UnixFS
interface BufferImporter ((file, blockstore) => AsyncIterable<(() => Promise<BufferImporterResult>)>)

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.BufferImporterResult.html b/interfaces/ipfs_unixfs_importer.index.BufferImporterResult.html index 911cdcef..01e1042c 100644 --- a/interfaces/ipfs_unixfs_importer.index.BufferImporterResult.html +++ b/interfaces/ipfs_unixfs_importer.index.BufferImporterResult.html @@ -1,6 +1,6 @@ -BufferImporterResult | UnixFS
interface BufferImporterResult {
    block: Uint8Array;
    cid: CID<unknown, number, number, Version>;
    path?: string;
    size: bigint;
    unixfs?: UnixFS;
}

Hierarchy (view full)

Properties

Properties

block: Uint8Array
cid: CID<unknown, number, number, Version>
path?: string
size: bigint
unixfs?: UnixFS

Generated using TypeDoc

\ No newline at end of file +BufferImporterResult | UnixFS
interface BufferImporterResult {
    block: Uint8Array;
    cid: CID<unknown, number, number, Version>;
    path?: string;
    size: bigint;
    unixfs?: UnixFS;
}

Hierarchy (view full)

Properties

Properties

block: Uint8Array
cid: CID<unknown, number, number, Version>
path?: string
size: bigint
unixfs?: UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.Directory.html b/interfaces/ipfs_unixfs_importer.index.Directory.html index 9375e293..509717d8 100644 --- a/interfaces/ipfs_unixfs_importer.index.Directory.html +++ b/interfaces/ipfs_unixfs_importer.index.Directory.html @@ -1,5 +1,5 @@ -Directory | UnixFS
interface Directory {
    mode?: number;
    mtime?: Mtime;
    originalPath?: string;
    path?: string;
}

Properties

mode?: number
mtime?: Mtime
originalPath?: string
path?: string

Generated using TypeDoc

\ No newline at end of file +Directory | UnixFS
interface Directory {
    mode?: number;
    mtime?: Mtime;
    originalPath?: string;
    path?: string;
}

Properties

mode?: number
mtime?: Mtime
originalPath?: string
path?: string

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.DirectoryCandidate.html b/interfaces/ipfs_unixfs_importer.index.DirectoryCandidate.html index 3811e37a..6986bc1d 100644 --- a/interfaces/ipfs_unixfs_importer.index.DirectoryCandidate.html +++ b/interfaces/ipfs_unixfs_importer.index.DirectoryCandidate.html @@ -1,4 +1,4 @@ -DirectoryCandidate | UnixFS
interface DirectoryCandidate {
    mode?: number;
    mtime?: Mtime;
    path: string;
}

Properties

Properties

mode?: number
mtime?: Mtime
path: string

Generated using TypeDoc

\ No newline at end of file +DirectoryCandidate | UnixFS
interface DirectoryCandidate {
    mode?: number;
    mtime?: Mtime;
    path: string;
}

Properties

Properties

mode?: number
mtime?: Mtime
path: string

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.File.html b/interfaces/ipfs_unixfs_importer.index.File.html index b11cad5b..41099b95 100644 --- a/interfaces/ipfs_unixfs_importer.index.File.html +++ b/interfaces/ipfs_unixfs_importer.index.File.html @@ -1,6 +1,6 @@ -File | UnixFS
interface File {
    content: AsyncIterable<Uint8Array>;
    mode?: number;
    mtime?: Mtime;
    originalPath?: string;
    path?: string;
}

Properties

content: AsyncIterable<Uint8Array>
mode?: number
mtime?: Mtime
originalPath?: string
path?: string

Generated using TypeDoc

\ No newline at end of file +File | UnixFS
interface File {
    content: AsyncIterable<Uint8Array>;
    mode?: number;
    mtime?: Mtime;
    originalPath?: string;
    path?: string;
}

Properties

content: AsyncIterable<Uint8Array>
mode?: number
mtime?: Mtime
originalPath?: string
path?: string

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.FileCandidate.html b/interfaces/ipfs_unixfs_importer.index.FileCandidate.html index 6bb6b110..8e56c2b5 100644 --- a/interfaces/ipfs_unixfs_importer.index.FileCandidate.html +++ b/interfaces/ipfs_unixfs_importer.index.FileCandidate.html @@ -1,5 +1,5 @@ -FileCandidate | UnixFS
interface FileCandidate<T> {
    content: T;
    mode?: number;
    mtime?: Mtime;
    path?: string;
}

Type Parameters

Properties

Properties

content: T
mode?: number
mtime?: Mtime
path?: string

Generated using TypeDoc

\ No newline at end of file +FileCandidate | UnixFS
interface FileCandidate<T> {
    content: T;
    mode?: number;
    mtime?: Mtime;
    path?: string;
}

Type Parameters

Properties

Properties

content: T
mode?: number
mtime?: Mtime
path?: string

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.HamtHashFn.html b/interfaces/ipfs_unixfs_importer.index.HamtHashFn.html index f54ac030..7d8c883d 100644 --- a/interfaces/ipfs_unixfs_importer.index.HamtHashFn.html +++ b/interfaces/ipfs_unixfs_importer.index.HamtHashFn.html @@ -1 +1 @@ -HamtHashFn | UnixFS
interface HamtHashFn ((value) => Promise<Uint8Array>)

Generated using TypeDoc

\ No newline at end of file +HamtHashFn | UnixFS
interface HamtHashFn ((value) => Promise<Uint8Array>)

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.ImportResult.html b/interfaces/ipfs_unixfs_importer.index.ImportResult.html index 6e6d64fe..67c41f8b 100644 --- a/interfaces/ipfs_unixfs_importer.index.ImportResult.html +++ b/interfaces/ipfs_unixfs_importer.index.ImportResult.html @@ -1,5 +1,5 @@ -ImportResult | UnixFS
interface ImportResult {
    cid: CID<unknown, number, number, Version>;
    path?: string;
    size: bigint;
    unixfs?: UnixFS;
}

Hierarchy (view full)

Properties

Properties

cid: CID<unknown, number, number, Version>
path?: string
size: bigint
unixfs?: UnixFS

Generated using TypeDoc

\ No newline at end of file +ImportResult | UnixFS
interface ImportResult {
    cid: CID<unknown, number, number, Version>;
    path?: string;
    size: bigint;
    unixfs?: UnixFS;
}

Hierarchy (view full)

Properties

Properties

cid: CID<unknown, number, number, Version>
path?: string
size: bigint
unixfs?: UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.ImporterOptions.html b/interfaces/ipfs_unixfs_importer.index.ImporterOptions.html index 68b67fbf..b36de962 100644 --- a/interfaces/ipfs_unixfs_importer.index.ImporterOptions.html +++ b/interfaces/ipfs_unixfs_importer.index.ImporterOptions.html @@ -1,23 +1,23 @@ -ImporterOptions | UnixFS

Options to control the importer's behaviour

-
interface ImporterOptions {
    blockWriteConcurrency?: number;
    bufferImporter?: BufferImporter;
    chunkValidator?: ChunkValidator;
    chunker?: Chunker;
    cidVersion?: Version;
    dagBuilder?: DAGBuilder;
    fileImportConcurrency?: number;
    layout?: FileLayout;
    leafType?: "file" | "raw";
    onProgress?: ((evt) => void);
    rawLeaves?: boolean;
    reduceSingleLeafToSelf?: boolean;
    shardFanoutBits?: number;
    shardSplitThresholdBytes?: number;
    treeBuilder?: TreeBuilder;
    wrapWithDirectory?: boolean;
}

Hierarchy

Properties

blockWriteConcurrency?: number

How many blocks to hash and write to the block store concurrently. For small +ImporterOptions | UnixFS

Options to control the importer's behaviour

+
interface ImporterOptions {
    blockWriteConcurrency?: number;
    bufferImporter?: BufferImporter;
    chunkValidator?: ChunkValidator;
    chunker?: Chunker;
    cidVersion?: Version;
    dagBuilder?: DAGBuilder;
    fileImportConcurrency?: number;
    layout?: FileLayout;
    leafType?: "file" | "raw";
    onProgress?: ((evt) => void);
    rawLeaves?: boolean;
    reduceSingleLeafToSelf?: boolean;
    shardFanoutBits?: number;
    shardSplitThresholdBytes?: number;
    treeBuilder?: TreeBuilder;
    wrapWithDirectory?: boolean;
}

Hierarchy

Properties

blockWriteConcurrency?: number

How many blocks to hash and write to the block store concurrently. For small numbers of large files this should be high (e.g. 50). Default: 50

-
bufferImporter?: BufferImporter

This option can be used to override the importer internals.

+
bufferImporter?: BufferImporter

This option can be used to override the importer internals.

This function should read Buffers from source and persist them using blockstore.put or similar entry is the { path, content } entry, where entry.content is an async @@ -26,15 +26,15 @@ the properties { cid, unixfs, size } where cid is a [CID], unixfs is a [UnixFS] entry and size is a Number that represents the serialized size of the [IPLD] node that holds the buffer data. Values will be pulled from this generator in parallel - the amount of parallelisation is controlled by the blockWriteConcurrency option (default: 10)

-
chunkValidator?: ChunkValidator

This option can be used to override the importer internals.

+
chunkValidator?: ChunkValidator

This option can be used to override the importer internals.

This function takes input from the content field of imported entries. It should transform them into Buffers, throwing an error if it cannot. It should yield Buffer objects constructed from the source or throw an Error

-
chunker?: Chunker

The chunking strategy. See ./src/chunker/index.ts +

chunker?: Chunker

The chunking strategy. See ./src/chunker/index.ts for available chunkers. Default: fixedSize

-
cidVersion?: Version

the CID version to use when storing the data. Default: 1

-
dagBuilder?: DAGBuilder

This option can be used to override the importer internals.

+
cidVersion?: Version

the CID version to use when storing the data. Default: 1

+
dagBuilder?: DAGBuilder

This option can be used to override the importer internals.

This function should read { path, content } entries from source and turn them into DAGs It should yield a function that returns a Promise that resolves to @@ -42,32 +42,32 @@ is a UnixFS entry and node is a DAGNode. Values will be pulled from this generator in parallel - the amount of parallelisation is controlled by the fileImportConcurrency option (default: 50)

-
fileImportConcurrency?: number

How many files to import concurrently. For large numbers of small files this +

fileImportConcurrency?: number

How many files to import concurrently. For large numbers of small files this should be high (e.g. 50). Default: 10

-
layout?: FileLayout

How the DAG that represents files are created. See +

layout?: FileLayout

How the DAG that represents files are created. See ./src/layout/index.ts for available layouts. Default: balanced

-
leafType?: "file" | "raw"

What type of UnixFS node leaves should be - can be 'file' or 'raw' +

leafType?: "file" | "raw"

What type of UnixFS node leaves should be - can be 'file' or 'raw' (ignored when rawLeaves is true).

This option exists to simulate kubo's trickle dag which uses a combination of 'raw' UnixFS leaves and reduceSingleLeafToSelf: false.

For modern code the rawLeaves: true option should be used instead so leaves are plain Uint8Arrays without a UnixFS/Protobuf wrapper.

-
onProgress?: ((evt) => void)

Type declaration

rawLeaves?: boolean

When a file would span multiple DAGNodes, if this is true the leaf nodes +

onProgress?: ((evt) => void)

Type declaration

rawLeaves?: boolean

When a file would span multiple DAGNodes, if this is true the leaf nodes will not be wrapped in UnixFS protobufs and will instead contain the raw file bytes. Default: true

-
reduceSingleLeafToSelf?: boolean

If the file being imported is small enough to fit into one DAGNodes, store +

reduceSingleLeafToSelf?: boolean

If the file being imported is small enough to fit into one DAGNodes, store the file data in the root node along with the UnixFS metadata instead of in a leaf node which would then require additional I/O to load. Default: true

-
shardFanoutBits?: number

The number of bits of a hash digest used at each level of sharding to +

shardFanoutBits?: number

The number of bits of a hash digest used at each level of sharding to the child index. 2**shardFanoutBits will dictate the maximum number of children for any shard in the HAMT. Default: 8

-
shardSplitThresholdBytes?: number

If the serialized node is larger than this it might be converted to a HAMT +

shardSplitThresholdBytes?: number

If the serialized node is larger than this it might be converted to a HAMT sharded directory. Default: 256KiB

-
treeBuilder?: TreeBuilder

This option can be used to override the importer internals.

+
treeBuilder?: TreeBuilder

This option can be used to override the importer internals.

This function should read { cid, path, unixfs, node } entries from source and place them in a directory structure It should yield an object with the properties { cid, path, unixfs, size } where cid is a CID, path is a string, unixfs is a UnixFS entry and size is a Number.

-
wrapWithDirectory?: boolean

If true, all imported files and folders will be contained in a directory that +

wrapWithDirectory?: boolean

If true, all imported files and folders will be contained in a directory that will correspond to the CID of the final entry yielded. Default: false

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.MultipleBlockImportResult.html b/interfaces/ipfs_unixfs_importer.index.MultipleBlockImportResult.html index 95dc235e..e10fd8a7 100644 --- a/interfaces/ipfs_unixfs_importer.index.MultipleBlockImportResult.html +++ b/interfaces/ipfs_unixfs_importer.index.MultipleBlockImportResult.html @@ -1,6 +1,6 @@ -MultipleBlockImportResult | UnixFS
interface MultipleBlockImportResult {
    cid: CID<unknown, number, number, Version>;
    originalPath?: string;
    path?: string;
    size: bigint;
    unixfs?: UnixFS;
}

Hierarchy (view full)

Properties

cid: CID<unknown, number, number, Version>
originalPath?: string
path?: string
size: bigint
unixfs?: UnixFS

Generated using TypeDoc

\ No newline at end of file +MultipleBlockImportResult | UnixFS
interface MultipleBlockImportResult {
    cid: CID<unknown, number, number, Version>;
    originalPath?: string;
    path?: string;
    size: bigint;
    unixfs?: UnixFS;
}

Hierarchy (view full)

Properties

cid: CID<unknown, number, number, Version>
originalPath?: string
path?: string
size: bigint
unixfs?: UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.SingleBlockImportResult.html b/interfaces/ipfs_unixfs_importer.index.SingleBlockImportResult.html index 5177b9f0..130ced57 100644 --- a/interfaces/ipfs_unixfs_importer.index.SingleBlockImportResult.html +++ b/interfaces/ipfs_unixfs_importer.index.SingleBlockImportResult.html @@ -1,8 +1,8 @@ -SingleBlockImportResult | UnixFS
interface SingleBlockImportResult {
    block: Uint8Array;
    cid: CID<unknown, number, number, Version>;
    originalPath?: string;
    path?: string;
    single: true;
    size: bigint;
    unixfs?: UnixFS;
}

Hierarchy (view full)

Properties

block: Uint8Array
cid: CID<unknown, number, number, Version>
originalPath?: string
path?: string
single: true
size: bigint
unixfs?: UnixFS

Generated using TypeDoc

\ No newline at end of file +SingleBlockImportResult | UnixFS
interface SingleBlockImportResult {
    block: Uint8Array;
    cid: CID<unknown, number, number, Version>;
    originalPath?: string;
    path?: string;
    single: true;
    size: bigint;
    unixfs?: UnixFS;
}

Hierarchy (view full)

Properties

block: Uint8Array
cid: CID<unknown, number, number, Version>
originalPath?: string
path?: string
single: true
size: bigint
unixfs?: UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.index.TreeBuilder.html b/interfaces/ipfs_unixfs_importer.index.TreeBuilder.html index 922b4590..b38de7f9 100644 --- a/interfaces/ipfs_unixfs_importer.index.TreeBuilder.html +++ b/interfaces/ipfs_unixfs_importer.index.TreeBuilder.html @@ -1 +1 @@ -TreeBuilder | UnixFS
interface TreeBuilder ((source, blockstore) => AsyncIterable<ImportResult>)

Generated using TypeDoc

\ No newline at end of file +TreeBuilder | UnixFS
interface TreeBuilder ((source, blockstore) => AsyncIterable<ImportResult>)

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.layout.FileLayout.html b/interfaces/ipfs_unixfs_importer.layout.FileLayout.html index 9588bf15..3b68444a 100644 --- a/interfaces/ipfs_unixfs_importer.layout.FileLayout.html +++ b/interfaces/ipfs_unixfs_importer.layout.FileLayout.html @@ -1 +1 @@ -FileLayout | UnixFS
interface FileLayout ((source, reducer) => Promise<InProgressImportResult>)

Generated using TypeDoc

\ No newline at end of file +FileLayout | UnixFS
interface FileLayout ((source, reducer) => Promise<InProgressImportResult>)

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ipfs_unixfs_importer.layout.Reducer.html b/interfaces/ipfs_unixfs_importer.layout.Reducer.html index 7ec6f713..b6d0f661 100644 --- a/interfaces/ipfs_unixfs_importer.layout.Reducer.html +++ b/interfaces/ipfs_unixfs_importer.layout.Reducer.html @@ -1 +1 @@ -Reducer | UnixFS

Generated using TypeDoc

\ No newline at end of file +Reducer | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/ipfs_unixfs.html b/modules/ipfs_unixfs.html index cd5b24c3..402a57f6 100644 --- a/modules/ipfs_unixfs.html +++ b/modules/ipfs_unixfs.html @@ -1,4 +1,4 @@ -ipfs-unixfs | UnixFS

Module ipfs-unixfs

This module contains the protobuf definition of the UnixFS data structure found at the root of all UnixFS DAGs.

+ipfs-unixfs | UnixFS

Module ipfs-unixfs

This module contains the protobuf definition of the UnixFS data structure found at the root of all UnixFS DAGs.

The UnixFS spec can be found in the ipfs/specs repository

Example: Create a file composed of several blocks

const data = new UnixFS({ type: 'file' })
data.addBlockSize(256) // add the size of each block
data.addBlockSize(256)
// ...
@@ -36,8 +36,8 @@

Example: Is this UnixFS entry a directory?

const file = new Data({ type: 'file' })
file.mtime // undefined

Object.prototype.hasOwnProperty.call(file, 'mtime') // false

const dir = new Data({ type: 'dir', mtime: new Date() })
dir.mtime // { secs: Number, nsecs: Number }
-

Index

Classes

Interfaces

Type Aliases

Generated using TypeDoc

\ No newline at end of file +

Index

Classes

Interfaces

Type Aliases

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/ipfs_unixfs_exporter.html b/modules/ipfs_unixfs_exporter.html index 70af2481..7a28c2f6 100644 --- a/modules/ipfs_unixfs_exporter.html +++ b/modules/ipfs_unixfs_exporter.html @@ -1,28 +1,28 @@ -ipfs-unixfs-exporter | UnixFS

Module ipfs-unixfs-exporter

The UnixFS Exporter provides a means to read DAGs from a blockstore given a CID.

+ipfs-unixfs-exporter | UnixFS

Module ipfs-unixfs-exporter

The UnixFS Exporter provides a means to read DAGs from a blockstore given a CID.

Example

// import a file and export it again
import { importer } from 'ipfs-unixfs-importer'
import { exporter } from 'ipfs-unixfs-exporter'
import { MemoryBlockstore } from 'blockstore-core/memory'

// Should contain the blocks we are trying to export
const blockstore = new MemoryBlockstore()
const files = []

for await (const file of importer([{
path: '/foo/bar.txt',
content: new Uint8Array([0, 1, 2, 3])
}], blockstore)) {
files.push(file)
}

console.info(files[0].cid) // Qmbaz

const entry = await exporter(files[0].cid, blockstore)

console.info(entry.cid) // Qmqux
console.info(entry.path) // Qmbaz/foo/bar.txt
console.info(entry.name) // bar.txt
console.info(entry.unixfs.fileSize()) // 4

// stream content from unixfs node
const size = entry.unixfs.fileSize()
const bytes = new Uint8Array(size)
let offset = 0

for await (const buf of entry.content()) {
bytes.set(buf, offset)
offset += chunk.length
}

console.info(bytes) // 0, 1, 2, 3
-

Index

Interfaces

Type Aliases

Functions

Generated using TypeDoc

\ No newline at end of file +

Index

Interfaces

Type Aliases

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/ipfs_unixfs_importer.chunker.html b/modules/ipfs_unixfs_importer.chunker.html index b6be7cdf..1aca2cfa 100644 --- a/modules/ipfs_unixfs_importer.chunker.html +++ b/modules/ipfs_unixfs_importer.chunker.html @@ -1,7 +1,7 @@ -chunker | UnixFS

Chunker functions split an incoming stream of bytes into chunks.

+chunker | UnixFS

Chunker functions split an incoming stream of bytes into chunks.

The default is a fixed-size chunker which splits them into equally sized chunks though other strategies are available such as Rabin chunking.

-

Index

Interfaces

Functions

Generated using TypeDoc

\ No newline at end of file +

Index

Interfaces

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/ipfs_unixfs_importer.html b/modules/ipfs_unixfs_importer.html index b1b42142..99d1017c 100644 --- a/modules/ipfs_unixfs_importer.html +++ b/modules/ipfs_unixfs_importer.html @@ -1,11 +1,26 @@ -ipfs-unixfs-importer | UnixFS

Module ipfs-unixfs-importer

ipfs-unixfs-importer

ipfs.tech +ipfs-unixfs-importer | UnixFS

Module ipfs-unixfs-importer

ipfs-unixfs-importer

ipfs.tech Discuss codecov CI

JavaScript implementation of the UnixFs importer used by IPFS

-

About

Example

Let's create a little directory to import:

+

About

+ +

Example

Let's create a little directory to import:

> cd /tmp
> mkdir foo
> echo 'hello' > foo/bar
> echo 'world' > foo/quux

And write the importing logic:

@@ -32,7 +47,7 @@

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

-

Index

Modules

Generated using TypeDoc

\ No newline at end of file +

Index

Modules

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/ipfs_unixfs_importer.index.html b/modules/ipfs_unixfs_importer.index.html index cd0297a3..1424fdaa 100644 --- a/modules/ipfs_unixfs_importer.index.html +++ b/modules/ipfs_unixfs_importer.index.html @@ -1,4 +1,4 @@ -index | UnixFS

Example

Let's create a little directory to import:

+index | UnixFS

Example

Let's create a little directory to import:

> cd /tmp
> mkdir foo
> echo 'hello' > foo/bar
> echo 'world' > foo/quux

And write the importing logic:

@@ -7,28 +7,28 @@

When run, metadata about DAGNodes in the created tree is printed until the root:

{
cid: CID, // see https://github.com/multiformats/js-cid
path: 'tmp/foo/bar',
unixfs: UnixFS // see https://github.com/ipfs/js-ipfs-unixfs
}
{
cid: CID, // see https://github.com/multiformats/js-cid
path: 'tmp/foo/quxx',
unixfs: UnixFS // see https://github.com/ipfs/js-ipfs-unixfs
}
{
cid: CID, // see https://github.com/multiformats/js-cid
path: 'tmp/foo',
unixfs: UnixFS // see https://github.com/ipfs/js-ipfs-unixfs
}
{
cid: CID, // see https://github.com/multiformats/js-cid
path: 'tmp',
unixfs: UnixFS // see https://github.com/ipfs/js-ipfs-unixfs
}
-

Index

Interfaces

Type Aliases

Functions

Generated using TypeDoc

\ No newline at end of file +

Index

Interfaces

Type Aliases

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/ipfs_unixfs_importer.layout.html b/modules/ipfs_unixfs_importer.layout.html index d53fe014..42912aaa 100644 --- a/modules/ipfs_unixfs_importer.layout.html +++ b/modules/ipfs_unixfs_importer.layout.html @@ -1,8 +1,8 @@ -layout | UnixFS

Layout functions allow customising the shape of final DAGs

+layout | UnixFS

Layout functions allow customising the shape of final DAGs

https://dag.ipfs.tech can be used to explore different conigurations.

-

Index

Interfaces

Functions

Generated using TypeDoc

\ No newline at end of file +

Index

Interfaces

Functions

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs.MtimeLike.html b/types/ipfs_unixfs.MtimeLike.html index 204ec05a..2fdf83df 100644 --- a/types/ipfs_unixfs.MtimeLike.html +++ b/types/ipfs_unixfs.MtimeLike.html @@ -1 +1 @@ -MtimeLike | UnixFS

Type alias MtimeLike

MtimeLike: Mtime | {
    FractionalNanoseconds?: number;
    Seconds: number;
} | [number, number] | Date

Type declaration

  • Optional FractionalNanoseconds?: number
  • Seconds: number

Generated using TypeDoc

\ No newline at end of file +MtimeLike | UnixFS

Type alias MtimeLike

MtimeLike: Mtime | {
    FractionalNanoseconds?: number;
    Seconds: number;
} | [number, number] | Date

Type declaration

  • Optional FractionalNanoseconds?: number
  • Seconds: number

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_exporter.ExporterProgressEvents.html b/types/ipfs_unixfs_exporter.ExporterProgressEvents.html index 5583e802..a8cd7150 100644 --- a/types/ipfs_unixfs_exporter.ExporterProgressEvents.html +++ b/types/ipfs_unixfs_exporter.ExporterProgressEvents.html @@ -1,2 +1,2 @@ -ExporterProgressEvents | UnixFS

Type alias ExporterProgressEvents

ExporterProgressEvents: ProgressEvent<"unixfs:exporter:progress:unixfs:file", ExportProgress> | ProgressEvent<"unixfs:exporter:progress:unixfs:raw", ExportProgress> | ProgressEvent<"unixfs:exporter:progress:raw", ExportProgress> | ProgressEvent<"unixfs:exporter:progress:identity", ExportProgress> | ProgressEvent<"unixfs:exporter:walk:file", ExportWalk> | ProgressEvent<"unixfs:exporter:walk:directory", ExportWalk> | ProgressEvent<"unixfs:exporter:walk:hamt-sharded-directory", ExportWalk> | ProgressEvent<"unixfs:exporter:walk:raw", ExportWalk>

Progress events emitted by the exporter

-

Generated using TypeDoc

\ No newline at end of file +ExporterProgressEvents | UnixFS

Type alias ExporterProgressEvents

ExporterProgressEvents: ProgressEvent<"unixfs:exporter:progress:unixfs:file", ExportProgress> | ProgressEvent<"unixfs:exporter:progress:unixfs:raw", ExportProgress> | ProgressEvent<"unixfs:exporter:progress:raw", ExportProgress> | ProgressEvent<"unixfs:exporter:progress:identity", ExportProgress> | ProgressEvent<"unixfs:exporter:walk:file", ExportWalk> | ProgressEvent<"unixfs:exporter:walk:directory", ExportWalk> | ProgressEvent<"unixfs:exporter:walk:hamt-sharded-directory", ExportWalk> | ProgressEvent<"unixfs:exporter:walk:raw", ExportWalk>

Progress events emitted by the exporter

+

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_exporter.ReadableStorage.html b/types/ipfs_unixfs_exporter.ReadableStorage.html index f49a75a0..56486bb5 100644 --- a/types/ipfs_unixfs_exporter.ReadableStorage.html +++ b/types/ipfs_unixfs_exporter.ReadableStorage.html @@ -1,3 +1,3 @@ -ReadableStorage | UnixFS
ReadableStorage: Pick<Blockstore, "get">

A subset of the Blockstore interface that just contains the get +ReadableStorage | UnixFS

ReadableStorage: Pick<Blockstore, "get">

A subset of the Blockstore interface that just contains the get method.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_exporter.UnixFSEntry.html b/types/ipfs_unixfs_exporter.UnixFSEntry.html index 9d71407c..deb4bb54 100644 --- a/types/ipfs_unixfs_exporter.UnixFSEntry.html +++ b/types/ipfs_unixfs_exporter.UnixFSEntry.html @@ -1,3 +1,3 @@ -UnixFSEntry | UnixFS

A UnixFSEntry is a representation of the types of node that can be +UnixFSEntry | UnixFS

A UnixFSEntry is a representation of the types of node that can be encountered in a DAG.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_exporter.UnixfsV1Content.html b/types/ipfs_unixfs_exporter.UnixfsV1Content.html index 5d0829f1..56614c8e 100644 --- a/types/ipfs_unixfs_exporter.UnixfsV1Content.html +++ b/types/ipfs_unixfs_exporter.UnixfsV1Content.html @@ -1 +1 @@ -UnixfsV1Content | UnixFS

Generated using TypeDoc

\ No newline at end of file +UnixfsV1Content | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_exporter.UnixfsV1DirectoryContent.html b/types/ipfs_unixfs_exporter.UnixfsV1DirectoryContent.html index 3a30aecf..4a9487b0 100644 --- a/types/ipfs_unixfs_exporter.UnixfsV1DirectoryContent.html +++ b/types/ipfs_unixfs_exporter.UnixfsV1DirectoryContent.html @@ -1 +1 @@ -UnixfsV1DirectoryContent | UnixFS

Type alias UnixfsV1DirectoryContent

UnixfsV1DirectoryContent: AsyncIterable<UnixFSEntry> | Iterable<UnixFSEntry>

Generated using TypeDoc

\ No newline at end of file +UnixfsV1DirectoryContent | UnixFS

Type alias UnixfsV1DirectoryContent

UnixfsV1DirectoryContent: AsyncIterable<UnixFSEntry> | Iterable<UnixFSEntry>

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_exporter.UnixfsV1FileContent.html b/types/ipfs_unixfs_exporter.UnixfsV1FileContent.html index 8a2f1b3a..c2856460 100644 --- a/types/ipfs_unixfs_exporter.UnixfsV1FileContent.html +++ b/types/ipfs_unixfs_exporter.UnixfsV1FileContent.html @@ -1 +1 @@ -UnixfsV1FileContent | UnixFS

Type alias UnixfsV1FileContent

UnixfsV1FileContent: AsyncIterable<Uint8Array> | Iterable<Uint8Array>

Generated using TypeDoc

\ No newline at end of file +UnixfsV1FileContent | UnixFS

Type alias UnixfsV1FileContent

UnixfsV1FileContent: AsyncIterable<Uint8Array> | Iterable<Uint8Array>

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_importer.index.ByteStream.html b/types/ipfs_unixfs_importer.index.ByteStream.html index fffbc176..5eba98ee 100644 --- a/types/ipfs_unixfs_importer.index.ByteStream.html +++ b/types/ipfs_unixfs_importer.index.ByteStream.html @@ -1 +1 @@ -ByteStream | UnixFS

Generated using TypeDoc

\ No newline at end of file +ByteStream | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_importer.index.ImportCandidate.html b/types/ipfs_unixfs_importer.index.ImportCandidate.html index f754f4c6..f8418131 100644 --- a/types/ipfs_unixfs_importer.index.ImportCandidate.html +++ b/types/ipfs_unixfs_importer.index.ImportCandidate.html @@ -1 +1 @@ -ImportCandidate | UnixFS

Generated using TypeDoc

\ No newline at end of file +ImportCandidate | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_importer.index.ImportCandidateStream.html b/types/ipfs_unixfs_importer.index.ImportCandidateStream.html index 40e2d489..f9a5e1cf 100644 --- a/types/ipfs_unixfs_importer.index.ImportCandidateStream.html +++ b/types/ipfs_unixfs_importer.index.ImportCandidateStream.html @@ -1 +1 @@ -ImportCandidateStream | UnixFS

Generated using TypeDoc

\ No newline at end of file +ImportCandidateStream | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_importer.index.ImportContent.html b/types/ipfs_unixfs_importer.index.ImportContent.html index 929f27d3..71b78887 100644 --- a/types/ipfs_unixfs_importer.index.ImportContent.html +++ b/types/ipfs_unixfs_importer.index.ImportContent.html @@ -1 +1 @@ -ImportContent | UnixFS

Generated using TypeDoc

\ No newline at end of file +ImportContent | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_importer.index.ImporterProgressEvents.html b/types/ipfs_unixfs_importer.index.ImporterProgressEvents.html index 18e70669..3d397ea6 100644 --- a/types/ipfs_unixfs_importer.index.ImporterProgressEvents.html +++ b/types/ipfs_unixfs_importer.index.ImporterProgressEvents.html @@ -1 +1 @@ -ImporterProgressEvents | UnixFS

Generated using TypeDoc

\ No newline at end of file +ImporterProgressEvents | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_importer.index.InProgressImportResult.html b/types/ipfs_unixfs_importer.index.InProgressImportResult.html index 781cc073..f4961d73 100644 --- a/types/ipfs_unixfs_importer.index.InProgressImportResult.html +++ b/types/ipfs_unixfs_importer.index.InProgressImportResult.html @@ -1 +1 @@ -InProgressImportResult | UnixFS

Generated using TypeDoc

\ No newline at end of file +InProgressImportResult | UnixFS

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ipfs_unixfs_importer.index.WritableStorage.html b/types/ipfs_unixfs_importer.index.WritableStorage.html index 58ba9fde..b1aaa937 100644 --- a/types/ipfs_unixfs_importer.index.WritableStorage.html +++ b/types/ipfs_unixfs_importer.index.WritableStorage.html @@ -1 +1 @@ -WritableStorage | UnixFS

Generated using TypeDoc

\ No newline at end of file +WritableStorage | UnixFS

Generated using TypeDoc

\ No newline at end of file