ui/client/features/directory-browser/hooks/useDirectoryLoader
Cockpit client (features), v0.8. Source: ui/client/features/directory-browser/hooks/useDirectoryLoader.tsx.
Functions#
useDirectoryLoader()#
useDirectoryLoader(
initialPath?):object
Defined in: ui/client/features/directory-browser/hooks/useDirectoryLoader.tsx:11
Owns the picker's state and the load/navigate primitives; starts at
initialPath, falling back to the server's default root if that path is
not browsable.
Parameters#
initialPath?
string
Returns#
object
dispatch
dispatch:
ActionDispatch<[DirectoryBrowserAction]>
load
load: (
path,offset?) =>Promise<DirListingView|null>
Parameters
path
string | undefined
offset?
number
Returns
Promise<DirListingView | null>
navigate
navigate: (
path?) =>Promise<DirListingView|null>
Parameters
path?
string
Returns
Promise<DirListingView | null>
showHiddenRef
showHiddenRef:
RefObject<boolean>
state
state:
DirectoryBrowserState