diff --git a/classes/errors.AlreadyExistsError.html b/classes/errors.AlreadyExistsError.html index ff1bf88..c24412b 100644 --- a/classes/errors.AlreadyExistsError.html +++ b/classes/errors.AlreadyExistsError.html @@ -1,4 +1,4 @@ -
Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.DoesNotExistError.html b/classes/errors.DoesNotExistError.html index 1f44d64..b2296d3 100644 --- a/classes/errors.DoesNotExistError.html +++ b/classes/errors.DoesNotExistError.html @@ -1,4 +1,4 @@ -Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.InvalidPBNodeError.html b/classes/errors.InvalidPBNodeError.html index 9a6d515..b704942 100644 --- a/classes/errors.InvalidPBNodeError.html +++ b/classes/errors.InvalidPBNodeError.html @@ -1,4 +1,4 @@ -Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.InvalidParametersError.html b/classes/errors.InvalidParametersError.html index fafffdc..ebd09c8 100644 --- a/classes/errors.InvalidParametersError.html +++ b/classes/errors.InvalidParametersError.html @@ -1,4 +1,4 @@ -Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.NoContentError.html b/classes/errors.NoContentError.html index d5d87dd..56d6782 100644 --- a/classes/errors.NoContentError.html +++ b/classes/errors.NoContentError.html @@ -1,4 +1,4 @@ -Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.NotADirectoryError.html b/classes/errors.NotADirectoryError.html index 5c22c33..ab9eb18 100644 --- a/classes/errors.NotADirectoryError.html +++ b/classes/errors.NotADirectoryError.html @@ -1,4 +1,4 @@ -Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.NotAFileError.html b/classes/errors.NotAFileError.html index bd78cf5..b6beac5 100644 --- a/classes/errors.NotAFileError.html +++ b/classes/errors.NotAFileError.html @@ -1,4 +1,4 @@ -Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.NotUnixFSError.html b/classes/errors.NotUnixFSError.html index 3170bd9..0b68e32 100644 --- a/classes/errors.NotUnixFSError.html +++ b/classes/errors.NotUnixFSError.html @@ -1,4 +1,4 @@ -Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.UnixFSError.html b/classes/errors.UnixFSError.html index 0435807..de4df39 100644 --- a/classes/errors.UnixFSError.html +++ b/classes/errors.UnixFSError.html @@ -1,4 +1,4 @@ -Abstract
Abstract
Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/classes/errors.UnknownError.html b/classes/errors.UnknownError.html index 8d244ed..8c33d9b 100644 --- a/classes/errors.UnknownError.html +++ b/classes/errors.UnknownError.html @@ -1,4 +1,4 @@ -Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
+Optional
causeReadonly
codeReadonly
nameOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
Optional override for formatting stack traces
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
diff --git a/functions/index.globSource.html b/functions/index.globSource.html index 6915bea..865914b 100644 --- a/functions/index.globSource.html +++ b/functions/index.globSource.html @@ -1,2 +1,2 @@Create an async iterator that yields paths that match requested glob pattern
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
options: RequestInitGenerated using TypeDoc
Optional
options: RequestInitGenerated using TypeDoc
+
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
Generated using TypeDoc
Options to pass to the cat command
-Optional
lengthStop reading the file after this many bytes
-Optional
offlineIf true, do not perform any network operations and throw if blocks are +
Optional
offlineIf true, do not perform any network operations and throw if blocks are missing from the local store. (default: false)
-Optional
offsetStart reading the file at this offset
-Optional
onOptional
pathAn optional path to allow reading files inside directories
-Optional
signalGenerated using TypeDoc
Optional
offsetStart reading the file at this offset
+Optional
onOptional
pathAn optional path to allow reading files inside directories
+Optional
signalGenerated using TypeDoc
Options to pass to the chmod command
-Optional
offlineIf true, do not perform any network operations and throw if blocks are missing from the local store. (default: false)
-Optional
onOptional
pathOptional path to set the mode on directory contents
-If the target of the operation is a directory and this is true, +
Optional
onOptional
pathOptional path to set the mode on directory contents
+If the target of the operation is a directory and this is true, apply the new mode to all directory contents
-DAGs with a root block larger than this value will be sharded. Blocks +
DAGs with a root block larger than this value will be sharded. Blocks smaller than this value will be regular UnixFS directories.
-Optional
signalGenerated using TypeDoc
Optional
signalGenerated using TypeDoc
Options to pass to the cp command
-If true, allow overwriting existing directory entries (default: false)
-Optional
offlineIf true, do not perform any network operations and throw if blocks are +
Optional
offlineIf true, do not perform any network operations and throw if blocks are missing from the local store. (default: false)
-Optional
onDAGs with a root block larger than this value will be sharded. Blocks +
Optional
onDAGs with a root block larger than this value will be sharded. Blocks smaller than this value will be regular UnixFS directories.
-Optional
signalGenerated using TypeDoc
Optional
signalGenerated using TypeDoc
Options to pass to the ls command
-Optional
lengthStop reading the directory contents after this many directory entries
-Optional
offlineIf true, do not perform any network operations and throw if blocks are +
Optional
offlineIf true, do not perform any network operations and throw if blocks are missing from the local store. (default: false)
-Optional
offsetStart reading the directory entries at this offset
-Optional
onOptional
pathOptional path to list subdirectory contents if the target CID resolves to +
Optional
offsetStart reading the directory entries at this offset
+Optional
onOptional
pathOptional path to list subdirectory contents if the target CID resolves to a directory
-Optional
signalGenerated using TypeDoc
Optional
signalGenerated using TypeDoc
Options to pass to the mkdir command
-The CID version to create the new directory with - defaults to the same version as the containing directory
-If true, allow overwriting existing directory entries (default: false)
-Optional
modeAn optional mode to set on the new directory
-Optional
mtimeAn optional mtime to set on the new directory
-Optional
offlineIf true, do not perform any network operations and throw if blocks are +
If true, allow overwriting existing directory entries (default: false)
+Optional
modeAn optional mode to set on the new directory
+Optional
mtimeAn optional mtime to set on the new directory
+Optional
offlineIf true, do not perform any network operations and throw if blocks are missing from the local store. (default: false)
-Optional
onDAGs with a root block larger than this value will be sharded. Blocks +
Optional
onDAGs with a root block larger than this value will be sharded. Blocks smaller than this value will be regular UnixFS directories.
-Optional
signalGenerated using TypeDoc
Optional
signalGenerated using TypeDoc
Options to pass to the rm command
-Optional
offlineIf true, do not perform any network operations and throw if blocks are missing from the local store. (default: false)
-Optional
onDAGs with a root block larger than this value will be sharded. Blocks +
Optional
onDAGs with a root block larger than this value will be sharded. Blocks smaller than this value will be regular UnixFS directories.
-Optional
signalGenerated using TypeDoc
Optional
signalGenerated using TypeDoc
Options to pass to the stat command
-Optional
offlineIf true, do not perform any network operations and throw if blocks are missing from the local store. (default: false)
-Optional
onOptional
pathAn optional path to allow statting paths inside directories
-Optional
signalGenerated using TypeDoc
Optional
onOptional
pathAn optional path to allow statting paths inside directories
+Optional
signalGenerated using TypeDoc
Options to pass to the touch command
-Optional
mtimeOptional mtime to set on the DAG root, defaults to the current time
-Optional
offlineIf true, do not perform any network operations and throw if blocks are +
Optional
offlineIf true, do not perform any network operations and throw if blocks are missing from the local store. (default: false)
-Optional
onOptional
pathOptional path to set mtime on directory contents
-If the DAG is a directory and this is true, update the mtime on all contents
-DAGs with a root block larger than this value will be sharded. Blocks +
Optional
onOptional
pathOptional path to set mtime on directory contents
+If the DAG is a directory and this is true, update the mtime on all contents
+DAGs with a root block larger than this value will be sharded. Blocks smaller than this value will be regular UnixFS directories.
-Optional
signalGenerated using TypeDoc
Optional
signalGenerated using TypeDoc
The UnixFS interface provides familiar filesystem operations to make working with UnixFS DAGs simple and intuitive.
-Optional
options: Partial<AddOptions>const source = [{
path: './foo.txt',
content: Uint8Array.from([0, 1, 2, 3])
}, {
path: './bar.txt',
content: Uint8Array.from([4, 5, 6, 7])
}]
for await (const entry of fs.import(source)) {
console.info(entry)
}
-Add a stream of Uint8Array
to your Helia node as a file.
Optional
options: Partial<AddOptions>import fs from 'fs'
const stream = fs.createReadStream('./foo.txt')
const cid = await fs.addByteStream(stream)
console.info(cid)
-Add a single Uint8Array
to your Helia node as a file.
Optional
options: Partial<AddOptions>const cid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
console.info(cid)
-Add a directory to your Helia node.
Optional
dir: Partial<DirectoryCandidate>Optional
options: Partial<AddOptions>const cid = await fs.addDirectory()
console.info(cid)
-Add a file to your Helia node with optional metadata.
Optional
options: Partial<AddOptions>const cid = await fs.addFile({
path: './foo.txt',
content: Uint8Array.from([0, 1, 2, 3]),
mode: 0x755,
mtime: {
secs: 10n,
nsecs: 0
}
})
console.info(cid)
-Retrieve the contents of a file from your Helia node.
+Retrieve the contents of a file from your Helia node.
Optional
options: Partial<CatOptions>for await (const buf of fs.cat(cid)) {
console.info(buf)
}
-Change the permissions on a file or directory in a DAG
Optional
options: Partial<ChmodOptions>const beforeCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
const beforeStats = await fs.stat(beforeCid)
const afterCid = await fs.chmod(cid, 0x755)
const afterStats = await fs.stat(afterCid)
console.info(beforeCid, beforeStats)
console.info(afterCid, afterStats)
-Add a file or directory to a target directory.
const fileCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
const directoryCid = await fs.addDirectory()
const updatedCid = await fs.cp(fileCid, directoryCid, 'foo.txt')
console.info(updatedCid)
-List directory contents.
+List directory contents.
for await (const entry of fs.ls(directoryCid)) {
console.info(entry)
}
-Make a new directory under an existing directory.
Optional
options: Partial<MkdirOptions>const directoryCid = await fs.addDirectory()
const updatedCid = await fs.mkdir(directoryCid, 'new-dir')
console.info(updatedCid)
-Remove a file or directory from an existing directory.
const directoryCid = await fs.addDirectory()
const updatedCid = await fs.mkdir(directoryCid, 'new-dir')
const finalCid = await fs.rm(updatedCid, 'new-dir')
console.info(finalCid)
-Return statistics about a UnixFS DAG.
+Return statistics about a UnixFS DAG.
Optional
options: Partial<StatOptions>const fileCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
const stats = await fs.stat(fileCid)
console.info(stats)
-Update the mtime of a UnixFS DAG
Optional
options: Partial<TouchOptions>const beforeCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
const beforeStats = await fs.stat(beforeCid)
const afterCid = await fs.touch(beforeCid)
const afterStats = await fs.stat(afterCid)
console.info(beforeCid, beforeStats)
console.info(afterCid, afterStats)
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Statistics relating to a UnixFS DAG
-How many blocks make up the DAG - nb. this will only be accurate if all blocks are present in the local blockstore
-The file or directory CID
-The size of the DAG that holds the file in bytes
-The size of the file in bytes
-How much of the DAG that holds the file is in the local blockstore
-How much of the file is in the local block store
-Optional
modeThe file or directory mode
-Optional
mtimeThe file or directory mtime
-The type of file
-Optional
unixfsUnixFS metadata about this file or directory. Will not be present +
The file or directory CID
+The size of the DAG that holds the file in bytes
+The size of the file in bytes
+How much of the DAG that holds the file is in the local blockstore
+How much of the file is in the local block store
+Optional
modeThe file or directory mode
+Optional
mtimeThe file or directory mtime
+The type of file
+Optional
unixfsUnixFS metadata about this file or directory. Will not be present
if the node is a raw
type.
Generated using TypeDoc
Generated using TypeDoc
Node.js-compatibly environments only:
import { globSource } from '@helia/unixfs'
for await (const entry of fs.addAll(globSource('path/to/containing/dir', 'glob-pattern'))) {
console.info(entry)
}
-Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional override for formatting stack traces
+