@nextcloud/files
    Preparing search index...

    Function getFavoriteNodes

    • Use WebDAV to query for favorite Nodes

      Parameters

      • options: { client?: WebDAVClient; davRoot?: string; path?: string; signal?: AbortSignal } = {}

        Options for the favorite query

        • Optionalclient?: WebDAVClient

          The WebDAV client to use for performing the request

        • OptionaldavRoot?: string

          The root path for the DAV user (defaults to defaultRootPath)

        • Optionalpath?: string

          Base path for the favorites, if unset all favorites are queried

        • Optionalsignal?: AbortSignal

          Optional abort signal to cancel the request

      Returns Promise<Node[]>

      import { getFavoriteNodes } from '@nextcloud/files'

      // query favorites for the root
      const favorites = await getFavoriteNodes()
      // Advanced usage with custom client and path
      import { getClient, defaultRootPath, getFavoriteNodes } from '@nextcloud/files'

      const client = getClient()
      const controller = new AbortController()
      const favoritesPromise = getFavoriteNodes({ client, path: '/some/folder', signal: controller.signal })
      // you can abort the request if needed
      controller.abort()
      // or await the result
      const favorites = await favoritesPromise