VolumeFileType
File type enum.Enumeration Members
Classes
Volume
Module for interacting with E2B volumes. Create aVolume instance to interact with a volume by its ID,
or use the static methods to manage volumes.
Constructors
Parameters
Returns
Volume
Properties
Methods
exists()
true if the path exists,
false if it does not (404). Other errors are rethrown.
Parameters
Returns
Promise<boolean>
true if the path exists, false otherwise.
getInfo()
Parameters
Returns
Promise<VolumeEntryStat>
information about the entry.
list()
Parameters
Returns
Promise<VolumeEntryStat[]>
list of entries in the directory.
makeDir()
Parameters
Returns
Promise<VolumeEntryStat>
readFile()
Call Signature
string.
You can pass text, bytes, blob, or stream to opts.format to change the return type.
Parameters
Returns
Promise<string>
file content as string
Call Signature
Uint8Array.
You can pass text, bytes, blob, or stream to opts.format to change the return type.
Parameters
Returns
Promise<Uint8Array<ArrayBufferLike>>
file content as Uint8Array
Call Signature
Blob.
You can pass text, bytes, blob, or stream to opts.format to change the return type.
Parameters
Returns
Promise<Blob>
file content as Blob
Call Signature
ReadableStream.
You can pass text, bytes, blob, or stream to opts.format to change the return type.
Parameters
Returns
Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>
file content as ReadableStream
remove()
Parameters
Returns
Promise<void>
updateMetadata()
Parameters
Returns
Promise<VolumeEntryStat>
updated entry information.
writeFile()
Parameters
Returns
Promise<VolumeEntryStat>
information about the written file
connect()
Parameters
Returns
Promise<Volume>
Volume instance.
create()
Parameters
Returns
Promise<Volume>
new Volume instance.
destroy()
Parameters
Returns
Promise<boolean>
getInfo()
Parameters
Returns
Promise<VolumeAndToken>
volume information.
list()
Parameters
Returns
Promise<VolumeInfo[]>
list of volume information.
VolumeConnectionConfig
Constructors
Parameters
Returns
VolumeConnectionConfig
Properties
Methods
getSignal()
Parameters
Returns
undefined | AbortSignal
Interfaces
VolumeApiOpts
Properties
domain?
Default
E2B_DOMAIN // environment variable ore2b.app
headers?
logger?
Logger interface—for example, console.
requestTimeoutMs?
Default
signal?
AbortSignal that can be used to cancel the in-flight request.
When the signal is aborted, the underlying fetch is aborted and the
returned promise rejects with an AbortError.