Line

You are reading docs for v0.8. See latest (v0.9)

ui/client/features/directory-browser/hooks/useWorkspaceFolder

Cockpit client (features), v0.8. Source: ui/client/features/directory-browser/hooks/useWorkspaceFolder.tsx.

Type Aliases#

WorkspaceFolder#

WorkspaceFolder = { state: "loading"; } | { path: string; state: "found"; } | { state: "missing"; }

Defined in: ui/client/features/directory-browser/hooks/useWorkspaceFolder.tsx:6

Functions#

useWorkspaceFolder()#

useWorkspaceFolder(name): WorkspaceFolder

Defined in: ui/client/features/directory-browser/hooks/useWorkspaceFolder.tsx:11

Looks for a folder named name directly inside the workspace, using the same workspace-scoped listing the folder picker uses (no other access). missing also covers a failed listing: callers only offer a shortcut when the folder is really there.

Parameters#

name

string

Returns#

WorkspaceFolder