LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithsandbox_async_sandboxAsyncSandboxls
Method●Since v0.13

ls

Copy
ls(
  self,
  path: str,
  *,
  limit: Optional[int] = None,
View source on GitHub
timeout
:
int
=
60
,
headers
:
RequestHeaders
=
None
)
->
GlobResult

Parameters

NameTypeDescription
path*str

Absolute path of the directory to list.

limitOptional[int]
Default:None

Maximum entries to return.

timeoutint
Default:60

Request timeout in seconds.

headersRequestHeaders
Default:None

List a directory's immediate entries, without recursing.

A convenience over :meth:glob with the pattern *.

Extra request headers.