Skip to content

walkRemoteTree

function walkRemoteTree(
fs: RemoteFileSystem,
rootPath: string,
options?: WalkRemoteTreeOptions): AsyncGenerator<RemoteTreeEntry>;

Defined in: src/sync/walkRemoteTree.ts:55

Walks a remote file system depth-first, yielding entries in a stable order.

Listings are sorted by entry path within each directory so output is deterministic across providers. Errors thrown by fs.list() propagate; callers can supply a filter to skip directories that should not be traversed.

ParameterTypeDescription
fsRemoteFileSystemRemote file system used for listings.
rootPathstringRoot directory to walk.
optionsWalkRemoteTreeOptionsOptional traversal controls.

AsyncGenerator<RemoteTreeEntry>

Async generator emitting RemoteTreeEntry records.

AbortError When the supplied abort signal is cancelled mid-walk.