Options
All
  • Public
  • Public/Protected
  • All
Menu

The walker class provides functions for walking the specified directory and provides a JSON structure of sub directories and files found.

export

Hierarchy

  • Walker

Index

Constructors

constructor

  • new Walker(directory?: string, excludeNodeModules?: boolean, allFiles?: boolean, logger: Logger, regex?: undefined | string): Walker
  • Creates an instance of Walker and builds JSON structure.

    memberof

    Walker

    Parameters

    • Default value directory: string = process.cwd()
    • Default value excludeNodeModules: boolean = true
    • Default value allFiles: boolean = false
    • logger: Logger
    • Optional regex: undefined | string

    Returns Walker

Properties

Private allFiles

allFiles: boolean

Private completePathedFileList

completePathedFileList: string[] = []

Holds a complete list of all file paths

memberof

Walker

Private excludeNodeModules

excludeNodeModules: boolean

Private logger

logger: Logger

Private regex

regex: RegExp

Accessors

pathedFileList

  • get pathedFileList(): string[]

structure

Methods

Private acceptableFile

  • acceptableFile(file: string): boolean

Private acceptableFolder

  • acceptableFolder(folder: string): boolean

Private buildStructure

Private createDirectoryStructure

Object literals

Private _structure

_structure: object

Holds the built JSON structure of the give directory

memberof

Walker

files

files: never[] = []

Generated using TypeDoc