@helia/unixfs 6.0.1 → 6.0.2-d4d97b83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/index.min.js +7 -2
- package/dist/index.min.js.map +4 -4
- package/dist/src/index.d.ts +10 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +10 -3
- package/dist/src/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +10 -3
- package/dist/typedoc-urls.json +0 -76
package/dist/src/index.d.ts
CHANGED
|
@@ -47,18 +47,25 @@
|
|
|
47
47
|
*
|
|
48
48
|
* @example Adding files and directories in the browser
|
|
49
49
|
*
|
|
50
|
-
* Uses [@cypsela/browser-source](https://github.com/cypsela/browser-source) to read [FileSystemEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry) and [FileSystemHandle](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle) files and directories.
|
|
50
|
+
* Uses [@cypsela/browser-source](https://github.com/cypsela/browser-source) to read [FileList](https://developer.mozilla.org/en-US/docs/Web/API/FileList), [FileSystemEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry), and [FileSystemHandle](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle) files and directories.
|
|
51
51
|
*
|
|
52
|
-
* Instances of these data types are available from drag
|
|
52
|
+
* Instances of these data types are available from [\<input type="file" />](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file) elements, [drag-and-drop events](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drop_event), and window methods like [showOpenFilePicker](https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker).
|
|
53
53
|
*
|
|
54
54
|
* ```typescript
|
|
55
55
|
* import { createHelia } from 'helia'
|
|
56
56
|
* import { unixfs } from '@helia/unixfs'
|
|
57
|
-
* import { fsEntrySource, fsHandleSource } from '@cypsela/browser-source'
|
|
57
|
+
* import { fileListSource, fsEntrySource, fsHandleSource } from '@cypsela/browser-source'
|
|
58
58
|
*
|
|
59
59
|
* const helia = await createHelia()
|
|
60
60
|
* const fs = unixfs(helia)
|
|
61
61
|
*
|
|
62
|
+
* // get FileList from <input type="file" /> elements
|
|
63
|
+
* const fileList = {} as FileList
|
|
64
|
+
*
|
|
65
|
+
* for await (const entry of fs.addAll(fileListSource(fileList))) {
|
|
66
|
+
* console.info(entry)
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
62
69
|
* // get FileSystemEntry from drag and drop events
|
|
63
70
|
* const fileEntry = {} as FileSystemEntry
|
|
64
71
|
*
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAC9G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,eAAe,EAAE,sBAAsB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,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KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IAE/E;;;;;;;;;;;;;OAaG;IACH,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IAEtE;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,GAAG,cAAc,GAAG,QAAQ,CAAC,CAAA;IACrF,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,GAAG,sBAAsB,GAAG,gBAAgB,CAAC,CAAA;IAErH;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;CAC/D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAE,KAAK,EAAE;IAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,CAAA;CAAE,GAAG,MAAM,CAE9F;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/src/index.js
CHANGED
|
@@ -47,18 +47,25 @@
|
|
|
47
47
|
*
|
|
48
48
|
* @example Adding files and directories in the browser
|
|
49
49
|
*
|
|
50
|
-
* Uses [@cypsela/browser-source](https://github.com/cypsela/browser-source) to read [FileSystemEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry) and [FileSystemHandle](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle) files and directories.
|
|
50
|
+
* Uses [@cypsela/browser-source](https://github.com/cypsela/browser-source) to read [FileList](https://developer.mozilla.org/en-US/docs/Web/API/FileList), [FileSystemEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry), and [FileSystemHandle](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle) files and directories.
|
|
51
51
|
*
|
|
52
|
-
* Instances of these data types are available from drag
|
|
52
|
+
* Instances of these data types are available from [\<input type="file" />](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file) elements, [drag-and-drop events](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drop_event), and window methods like [showOpenFilePicker](https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker).
|
|
53
53
|
*
|
|
54
54
|
* ```typescript
|
|
55
55
|
* import { createHelia } from 'helia'
|
|
56
56
|
* import { unixfs } from '@helia/unixfs'
|
|
57
|
-
* import { fsEntrySource, fsHandleSource } from '@cypsela/browser-source'
|
|
57
|
+
* import { fileListSource, fsEntrySource, fsHandleSource } from '@cypsela/browser-source'
|
|
58
58
|
*
|
|
59
59
|
* const helia = await createHelia()
|
|
60
60
|
* const fs = unixfs(helia)
|
|
61
61
|
*
|
|
62
|
+
* // get FileList from <input type="file" /> elements
|
|
63
|
+
* const fileList = {} as FileList
|
|
64
|
+
*
|
|
65
|
+
* for await (const entry of fs.addAll(fileListSource(fileList))) {
|
|
66
|
+
* console.info(entry)
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
62
69
|
* // get FileSystemEntry from drag and drop events
|
|
63
70
|
* const fileEntry = {} as FileSystemEntry
|
|
64
71
|
*
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AAEH,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,aAAa,CAAA;AAqoBnD;;GAEG;AACH,MAAM,UAAU,MAAM,CAAE,KAA8D;IACpF,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,CAAA;AAC/B,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/unixfs",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2-d4d97b83",
|
|
4
4
|
"description": "A Helia-compatible wrapper for UnixFS",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/helia/tree/main/packages/unixfs#readme",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"test:electron-main": "aegir test -t electron-main"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@helia/interface": "
|
|
70
|
+
"@helia/interface": "6.0.1-d4d97b83",
|
|
71
71
|
"@ipld/dag-pb": "^4.1.5",
|
|
72
|
-
"@libp2p/interface": "^3.0
|
|
72
|
+
"@libp2p/interface": "^3.1.0",
|
|
73
73
|
"@libp2p/logger": "^6.0.5",
|
|
74
74
|
"@libp2p/utils": "^7.0.5",
|
|
75
75
|
"@multiformats/murmur3": "^2.1.8",
|
package/src/index.ts
CHANGED
|
@@ -47,18 +47,25 @@
|
|
|
47
47
|
*
|
|
48
48
|
* @example Adding files and directories in the browser
|
|
49
49
|
*
|
|
50
|
-
* Uses [@cypsela/browser-source](https://github.com/cypsela/browser-source) to read [FileSystemEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry) and [FileSystemHandle](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle) files and directories.
|
|
50
|
+
* Uses [@cypsela/browser-source](https://github.com/cypsela/browser-source) to read [FileList](https://developer.mozilla.org/en-US/docs/Web/API/FileList), [FileSystemEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry), and [FileSystemHandle](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle) files and directories.
|
|
51
51
|
*
|
|
52
|
-
* Instances of these data types are available from drag
|
|
52
|
+
* Instances of these data types are available from [\<input type="file" />](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file) elements, [drag-and-drop events](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drop_event), and window methods like [showOpenFilePicker](https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker).
|
|
53
53
|
*
|
|
54
54
|
* ```typescript
|
|
55
55
|
* import { createHelia } from 'helia'
|
|
56
56
|
* import { unixfs } from '@helia/unixfs'
|
|
57
|
-
* import { fsEntrySource, fsHandleSource } from '@cypsela/browser-source'
|
|
57
|
+
* import { fileListSource, fsEntrySource, fsHandleSource } from '@cypsela/browser-source'
|
|
58
58
|
*
|
|
59
59
|
* const helia = await createHelia()
|
|
60
60
|
* const fs = unixfs(helia)
|
|
61
61
|
*
|
|
62
|
+
* // get FileList from <input type="file" /> elements
|
|
63
|
+
* const fileList = {} as FileList
|
|
64
|
+
*
|
|
65
|
+
* for await (const entry of fs.addAll(fileListSource(fileList))) {
|
|
66
|
+
* console.info(entry)
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
62
69
|
* // get FileSystemEntry from drag and drop events
|
|
63
70
|
* const fileEntry = {} as FileSystemEntry
|
|
64
71
|
*
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"AlreadyExistsError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.AlreadyExistsError.html",
|
|
3
|
-
"./errors:AlreadyExistsError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.AlreadyExistsError.html",
|
|
4
|
-
"DoesNotExistError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.DoesNotExistError.html",
|
|
5
|
-
"./errors:DoesNotExistError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.DoesNotExistError.html",
|
|
6
|
-
"InvalidParametersError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.InvalidParametersError.html",
|
|
7
|
-
"./errors:InvalidParametersError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.InvalidParametersError.html",
|
|
8
|
-
"InvalidPBNodeError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.InvalidPBNodeError.html",
|
|
9
|
-
"./errors:InvalidPBNodeError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.InvalidPBNodeError.html",
|
|
10
|
-
"NoContentError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.NoContentError.html",
|
|
11
|
-
"./errors:NoContentError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.NoContentError.html",
|
|
12
|
-
"NotADirectoryError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.NotADirectoryError.html",
|
|
13
|
-
"./errors:NotADirectoryError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.NotADirectoryError.html",
|
|
14
|
-
"NotAFileError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.NotAFileError.html",
|
|
15
|
-
"./errors:NotAFileError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.NotAFileError.html",
|
|
16
|
-
"NotUnixFSError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.NotUnixFSError.html",
|
|
17
|
-
"./errors:NotUnixFSError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.NotUnixFSError.html",
|
|
18
|
-
"UnixFSError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.UnixFSError.html",
|
|
19
|
-
"./errors:UnixFSError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.UnixFSError.html",
|
|
20
|
-
"UnknownError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.UnknownError.html",
|
|
21
|
-
"./errors:UnknownError": "https://ipfs.github.io/helia/classes/_helia_unixfs.errors.UnknownError.html",
|
|
22
|
-
"AddOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.AddOptions.html",
|
|
23
|
-
".:AddOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.AddOptions.html",
|
|
24
|
-
"CatOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.CatOptions.html",
|
|
25
|
-
".:CatOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.CatOptions.html",
|
|
26
|
-
"ChmodOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ChmodOptions.html",
|
|
27
|
-
".:ChmodOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ChmodOptions.html",
|
|
28
|
-
"CpOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.CpOptions.html",
|
|
29
|
-
".:CpOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.CpOptions.html",
|
|
30
|
-
"DirectoryStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.DirectoryStats.html",
|
|
31
|
-
".:DirectoryStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.DirectoryStats.html",
|
|
32
|
-
"ExtendedDirectoryStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedDirectoryStats.html",
|
|
33
|
-
".:ExtendedDirectoryStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedDirectoryStats.html",
|
|
34
|
-
"ExtendedFileStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedFileStats.html",
|
|
35
|
-
".:ExtendedFileStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedFileStats.html",
|
|
36
|
-
"ExtendedRawStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedRawStats.html",
|
|
37
|
-
".:ExtendedRawStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedRawStats.html",
|
|
38
|
-
"ExtendedStatOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedStatOptions.html",
|
|
39
|
-
".:ExtendedStatOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedStatOptions.html",
|
|
40
|
-
"ExtendedStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedStats.html",
|
|
41
|
-
".:ExtendedStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.ExtendedStats.html",
|
|
42
|
-
"FileCandidate": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.FileCandidate.html",
|
|
43
|
-
".:FileCandidate": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.FileCandidate.html",
|
|
44
|
-
"FileStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.FileStats.html",
|
|
45
|
-
".:FileStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.FileStats.html",
|
|
46
|
-
"GlobSourceOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.GlobSourceOptions.html",
|
|
47
|
-
"GlobSourceResult": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.GlobSourceResult.html",
|
|
48
|
-
"LsOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.LsOptions.html",
|
|
49
|
-
".:LsOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.LsOptions.html",
|
|
50
|
-
"MkdirOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.MkdirOptions.html",
|
|
51
|
-
".:MkdirOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.MkdirOptions.html",
|
|
52
|
-
"RawStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.RawStats.html",
|
|
53
|
-
".:RawStats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.RawStats.html",
|
|
54
|
-
"RmOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.RmOptions.html",
|
|
55
|
-
".:RmOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.RmOptions.html",
|
|
56
|
-
"StatOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.StatOptions.html",
|
|
57
|
-
".:StatOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.StatOptions.html",
|
|
58
|
-
"Stats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.Stats.html",
|
|
59
|
-
".:Stats": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.Stats.html",
|
|
60
|
-
"TouchOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.TouchOptions.html",
|
|
61
|
-
".:TouchOptions": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.TouchOptions.html",
|
|
62
|
-
"UnixFS": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.UnixFS.html",
|
|
63
|
-
".:UnixFS": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.UnixFS.html",
|
|
64
|
-
"UnixFSComponents": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.UnixFSComponents.html",
|
|
65
|
-
".:UnixFSComponents": "https://ipfs.github.io/helia/interfaces/_helia_unixfs.index.UnixFSComponents.html",
|
|
66
|
-
"AddEvents": "https://ipfs.github.io/helia/types/_helia_unixfs.index.AddEvents.html",
|
|
67
|
-
".:AddEvents": "https://ipfs.github.io/helia/types/_helia_unixfs.index.AddEvents.html",
|
|
68
|
-
"AddFileOptions": "https://ipfs.github.io/helia/types/_helia_unixfs.index.AddFileOptions.html",
|
|
69
|
-
".:AddFileOptions": "https://ipfs.github.io/helia/types/_helia_unixfs.index.AddFileOptions.html",
|
|
70
|
-
"GetEvents": "https://ipfs.github.io/helia/types/_helia_unixfs.index.GetEvents.html",
|
|
71
|
-
".:GetEvents": "https://ipfs.github.io/helia/types/_helia_unixfs.index.GetEvents.html",
|
|
72
|
-
"globSource": "https://ipfs.github.io/helia/functions/_helia_unixfs.index.globSource.html",
|
|
73
|
-
"unixfs": "https://ipfs.github.io/helia/functions/_helia_unixfs.index.unixfs.html",
|
|
74
|
-
".:unixfs": "https://ipfs.github.io/helia/functions/_helia_unixfs.index.unixfs.html",
|
|
75
|
-
"urlSource": "https://ipfs.github.io/helia/functions/_helia_unixfs.index.urlSource.html"
|
|
76
|
-
}
|