For the complete documentation index, see llms.txt. This page is also available as Markdown.

Table.toDirectory

Table.toDirectory([{ fileIdVariable, fileNameVariable, signal }]) → Promise<Directory>

Returns a Directory of the files in a file index table, which can be navigated, listed, and downloaded. The listing is cached, and only fetched again if the table has changed.

Also callable on Queries → query.toDirectory(...)

Parameters:

fileIdVariable : string, default 'file_id' The variable containing the files' ids.

fileNameVariable : string, default 'file_name' The variable containing the files' names (or paths).

signal : AbortSignal, optional

Returns: Promise<Directory>

Was this helpful?