# Class LocalSkillSource

java.lang.Object
com.google.adk.skills.AbstractSkillSource<Path>
com.google.adk.skills.LocalSkillSource

All Implemented Interfaces:
  `SkillSource`

public final class LocalSkillSource extends AbstractSkillSource<Path>
Loads skills from the local file system.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class AbstractSkillSource

  `AbstractSkillSource.SkillMdPath`
  Modifier and Type
  Class
  Description
  `protected final class`
  `AbstractSkillSource.SkillMdPath`
  A container class that holds a skill's name and the path to its SKILL.md file.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LocalSkillSource(Path skillsBasePath)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected io.reactivex.rxjava3.core.Single<Path>`
  `findResourcePath(String skillName, String resourcePath)`
  Returns the path to the resource for the given skill.
  `protected io.reactivex.rxjava3.core.Single<Path>`
  `findSkillMdPath(String skillName)`
  Returns the path to the SKILL.md file for the given skill.
  `io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<String>>`
  `listResources(String skillName, String resourceDirectory)`
  Lists all resource files for a specific skill within a given directory.
  `protected io.reactivex.rxjava3.core.Flowable<AbstractSkillSource<Path>.SkillMdPath>`
  `listSkills()`
  Returns a `Flowable` of skills as a pair of skill name and the path to the SKILL.md file.
  `protected ReadableByteChannel`
  `openChannel(Path path)`
  Opens a `InputStream` for reading the content of the given path.

  ### Methods inherited from class AbstractSkillSource

  `listFrontmatters, loadFrontmatter, loadInstructions, loadResource`
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableMap<String, Frontmatter>>`
  `listFrontmatters()`
  Lists all available `Frontmatter`s for discovered skills.
  `io.reactivex.rxjava3.core.Single<Frontmatter>`
  `loadFrontmatter(String skillName)`
  Loads the `Frontmatter` for a specific skill.
  `io.reactivex.rxjava3.core.Single<String>`
  `loadInstructions(String skillName)`
  Loads the instructions (body of SKILL.md) for a specific skill.
  `io.reactivex.rxjava3.core.Single<com.google.common.io.ByteSource>`
  `loadResource(String skillName, String resourcePath)`
  Loads a specific resource file content.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LocalSkillSource

    public LocalSkillSource(Path skillsBasePath)

- ## Method Details

  - ### listResources

    public io.reactivex.rxjava3.core.Single<com.google.common.collect.ImmutableList<String>> listResources(String skillName, String resourceDirectory)
    Description copied from interface: `SkillSource`
    Lists all resource files for a specific skill within a given directory.

    If the skill or the resource directory does not exist, the returned `Single` will terminate with a `SkillSourceException`.

    Parameters:
      `skillName` - the name of the skill
      `resourceDirectory` - the relative directory within the skill to list (e.g., "assets", "scripts")
    Returns:
      a `Single` emitting a list of resource paths relative to the skill directory

  - ### listSkills

    protected io.reactivex.rxjava3.core.Flowable<AbstractSkillSource<Path>.SkillMdPath> listSkills()
    Description copied from class: `AbstractSkillSource`
    Returns a `Flowable` of skills as a pair of skill name and the path to the SKILL.md file.
    Specified by:
      `listSkills` in class `AbstractSkillSource<Path>`

  - ### findResourcePath

    protected io.reactivex.rxjava3.core.Single<Path> findResourcePath(String skillName, String resourcePath)
    Description copied from class: `AbstractSkillSource`
    Returns the path to the resource for the given skill.
    Specified by:
      `findResourcePath` in class `AbstractSkillSource<Path>`

  - ### findSkillMdPath

    protected io.reactivex.rxjava3.core.Single<Path> findSkillMdPath(String skillName)
    Description copied from class: `AbstractSkillSource`
    Returns the path to the SKILL.md file for the given skill.
    Specified by:
      `findSkillMdPath` in class `AbstractSkillSource<Path>`

  - ### openChannel

    protected ReadableByteChannel openChannel(Path path) throws IOException
    Description copied from class: `AbstractSkillSource`
    Opens a `InputStream` for reading the content of the given path.
    Specified by:
      `openChannel` in class `AbstractSkillSource<Path>`
    Throws:
      `IOException`