Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Directory

Represents a directory in GitHub

Hierarchy

  • Directory

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    • github: Octokit

      The GitHub API

    • repo: Repository

      The repository that instantiated the directory listing

    • path: string

      The relative path that leads to this directory

    • tree: TreeItem[]

      The directory listing

    Returns Directory

Properties

github

github: Octokit

path

path: string

repo

tree

tree: TreeItem[]

Methods

download

  • download(name: string): Promise<string>
  • Download a file from the repository

    Parameters

    • name: string

      The file to download

    Returns Promise<string>

getDirectory

  • getDirectory(name: string): Promise<Directory>
  • Get a subdirectory from a path.

    Parameters

    • name: string

      The file to retrieve

    Returns Promise<Directory>

getFile

  • Obtain a file's metadata from a directory

    Parameters

    • name: string

      The file to retrieve

    Returns TreeItem

Generated using TypeDoc