Interface ParseOptions

Interface of the options object used with "parse" or "parseTree" functions

interface ParseOptions {
    depth?: number;
    exclude?: string | RegExp | (string | RegExp)[];
    extensions?: string[];
    followLinks?: boolean;
    homeShortcut?: boolean;
    showHidden?: boolean;
    skipErrors?: boolean;
    sorted?: boolean | SortMethodPredefined | SortDiscriminator;
    symbolicLinks?: boolean;
}

Properties

depth?: number

It is a number which says the max depth the algorithm can reach scanning the given path. All files and dirs which are beyound the max depth will not be considered by the algorithm

exclude?: string | RegExp | (string | RegExp)[]

It is a regex, string (glob patterns) or array of them and all the matched paths will not be considered by the algorithm

extensions?: string[]

It is an array of strings and all the files whose extension is not included in that array will be skipped by the algorithm. If value is undefined, all file extensions will be considered, if it is [], no files will be included

followLinks?: boolean

If true, all symbolic links will be followed, including even their content if they link to a folder. Could not work on Windows

homeShortcut?: boolean

If true, the unix homedir shortcut ~ will be expanded to the user home directory

showHidden?: boolean

If true, all hidden files and dirs will be included in the result. A hidden file or a directory has a name which starts with a dot and in some systems like Linux are hidden

skipErrors?: boolean

If true, folders whose user has not permissions will be skipped. An error will be thrown otherwise. Note: in fact every error thrown by fs calls will be ignored

If true, directories and files will be scanned ordered by path. The value can be both boolean for default alpha order, a custom sorting function or a predefined sorting method in [[SortMethodPredefined]].

symbolicLinks?: boolean

If true, all symbolic links found will be included in the result. Could not work on Windows

Generated using TypeDoc