Class FileList

Index

Constructor methods

Methods

Constructor methods

constructor(): FileList

Returns

FileList

Methods

public clearExclude()

Get rid of any current exclusion rules

public exclude(file: Array<string>)

Excludes file-patterns from the FileList. Should be called with one or more pattern for finding file to include in the list. Arguments can be:

  1. Strings for either a glob-pattern or a specific file-name
  2. Regular expression literals
  3. Functions to be run on the filename that return a true/false

Parameters

  • file: Array<string>

public exclude(file?: Array<string>)

Parameters

  • file?: Array<string> optional

public exclude(file: Array<RegExp>)

Parameters

  • file: Array<RegExp>

public exclude(file?: Array<RegExp>)

Parameters

  • file?: Array<RegExp> optional

public exclude(file: FileFilter[])

Parameters

public exclude(file?: FileFilter[])

Parameters

public include(files: Array<string>)

Includes file-patterns in the FileList. Should be called with one or more pattern for finding file to include in the list. Arguments should be strings for either a glob-pattern or a specific file-name, or an array of them

Parameters

  • files: Array<string>

public include(files?: Array<string>)

Parameters

  • files?: Array<string> optional

public resolve()

Populates the FileList from the include/exclude rules with a list of actual files

public shouldExclude(name: string): boolean

Indicates whether a particular file would be filtered out by the current exclusion rules for this FileList.

Parameters

  • name: string

    The filename to check

Returns

boolean

Whether or not the file should be excluded

public toArray(): Array<string>

Convert to a plain-jane array

Returns

Array<string>