ts-repo-utils
    Preparing search index...

    Function glob

    • Parameters

      • source: string | readonly string[]
      • options: {
            absolute?: boolean;
            baseNameMatch?: boolean;
            braceExpansion?: boolean;
            caseSensitiveMatch?: boolean;
            concurrency?: number;
            cwd?: string;
            deep?: number;
            dot?: boolean;
            extglob?: boolean;
            followSymbolicLinks?: boolean;
            fs?: {
                lstat?: StatAsynchronousMethod;
                lstatSync?: StatSynchronousMethod;
                readdir?: ReaddirAsynchronousMethod;
                readdirSync?: ReaddirSynchronousMethod;
                stat?: StatAsynchronousMethod;
                statSync?: StatSynchronousMethod;
            };
            globstar?: boolean;
            ignore?: readonly string[];
            markDirectories?: boolean;
            objectMode?: boolean;
            onlyDirectories?: boolean;
            onlyFiles?: boolean;
            stats?: boolean;
            suppressErrors?: boolean;
            throwErrorOnBrokenSymbolicLink?: boolean;
            unique?: boolean;
        } & EntryObjectPredicate
        • Optional Readonlyabsolute?: boolean

          Return the absolute path for entries.

          false
          
        • Optional ReadonlybaseNameMatch?: boolean

          If set to true, then patterns without slashes will be matched against the basename of the path if it contains slashes.

          false
          
        • Optional ReadonlybraceExpansion?: boolean

          Enables Bash-like brace expansion.

          true
          
        • Optional ReadonlycaseSensitiveMatch?: boolean

          Enables a case-sensitive mode for matching files.

          true
          
        • Optional Readonlyconcurrency?: number

          Specifies the maximum number of concurrent requests from a reader to read directories.

          os.cpus().length
          
        • Optional Readonlycwd?: string

          The current working directory in which to search.

          process.cwd()
          
        • Optional Readonlydeep?: number

          Specifies the maximum depth of a read directory relative to the start directory.

          Infinity
          
        • Optional Readonlydot?: boolean

          Allow patterns to match entries that begin with a period (.).

          false
          
        • Optional Readonlyextglob?: boolean

          Enables Bash-like extglob functionality.

          true
          
        • Optional ReadonlyfollowSymbolicLinks?: boolean

          Indicates whether to traverse descendants of symbolic link directories.

          true
          
        • Optional Readonlyfs?: {
              lstat?: StatAsynchronousMethod;
              lstatSync?: StatSynchronousMethod;
              readdir?: ReaddirAsynchronousMethod;
              readdirSync?: ReaddirSynchronousMethod;
              stat?: StatAsynchronousMethod;
              statSync?: StatSynchronousMethod;
          }

          Custom implementation of methods for working with the file system.

          fs.*
          
        • Optional Readonlyglobstar?: boolean

          Enables recursively repeats a pattern containing **. If false, ** behaves exactly like *.

          true
          
        • Optional Readonlyignore?: readonly string[]

          An array of glob patterns to exclude matches. This is an alternative way to use negative patterns.

          []
          
        • Optional ReadonlymarkDirectories?: boolean

          Mark the directory path with the final slash.

          false
          
        • Optional ReadonlyobjectMode?: boolean

          Returns objects (instead of strings) describing entries.

          false
          
        • Optional ReadonlyonlyDirectories?: boolean

          Return only directories.

          false
          
        • Optional ReadonlyonlyFiles?: boolean

          Return only files.

          true
          
        • Optional Readonlystats?: boolean

          Enables an object mode (objectMode) with an additional stats field.

          false
          
        • Optional ReadonlysuppressErrors?: boolean

          By default this package suppress only ENOENT errors. Set to true to suppress any error.

          false
          
        • Optional ReadonlythrowErrorOnBrokenSymbolicLink?: boolean

          Throw an error when symbolic link is broken if true or safely return lstat call if false.

          false
          
        • Optional Readonlyunique?: boolean

          Ensures that the returned entries are unique.

          true
          

      Returns Promise<
          Result<
              readonly {
                  dirent: {
                      name: string;
                      parentPath: string;
                      isBlockDevice(): boolean;
                      isCharacterDevice(): boolean;
                      isDirectory(): boolean;
                      isFIFO(): boolean;
                      isFile(): boolean;
                      isSocket(): boolean;
                      isSymbolicLink(): boolean;
                  };
                  name: string;
                  path: string;
                  stats?: {
                      atime: {
                          "[toPrimitive]"(hint: "default"): string;
                          "[toPrimitive]"(hint: "string"): string;
                          "[toPrimitive]"(hint: "number"): number;
                          "[toPrimitive]"(hint: string): string | number;
                          getDate(): number;
                          getDay(): number;
                          getFullYear(): number;
                          getHours(): number;
                          getMilliseconds(): number;
                          getMinutes(): number;
                          getMonth(): number;
                          getSeconds(): number;
                          getTime(): number;
                          getTimezoneOffset(): number;
                          getUTCDate(): number;
                          getUTCDay(): number;
                          getUTCFullYear(): number;
                          getUTCHours(): number;
                          getUTCMilliseconds(): number;
                          getUTCMinutes(): number;
                          getUTCMonth(): number;
                          getUTCSeconds(): number;
                          setDate(date: number): number;
                          setFullYear(year: number, month?: number, date?: number): number;
                          setHours(
                              hours: number,
                              min?: number,
                              sec?: number,
                              ms?: number,
                          ): number;
                          setMilliseconds(ms: number): number;
                          setMinutes(min: number, sec?: number, ms?: number): number;
                          setMonth(month: number, date?: number): number;
                          setSeconds(sec: number, ms?: number): number;
                          setTime(time: number): number;
                          setUTCDate(date: number): number;
                          setUTCFullYear(year: number, month?: number, date?: number): number;
                          setUTCHours(
                              hours: number,
                              min?: number,
                              sec?: number,
                              ms?: number,
                          ): number;
                          setUTCMilliseconds(ms: number): number;
                          setUTCMinutes(min: number, sec?: number, ms?: number): number;
                          setUTCMonth(month: number, date?: number): number;
                          setUTCSeconds(sec: number, ms?: number): number;
                          toDateString(): string;
                          toISOString(): string;
                          toJSON(key?: any): string;
                          toLocaleDateString(): string;
                          toLocaleDateString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleDateString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleString(): string;
                          toLocaleString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleTimeString(): string;
                          toLocaleTimeString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleTimeString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toString(): string;
                          toTimeString(): string;
                          toUTCString(): string;
                          valueOf(): number;
                      };
                      atimeMs: number;
                      birthtime: {
                          "[toPrimitive]"(hint: "default"): string;
                          "[toPrimitive]"(hint: "string"): string;
                          "[toPrimitive]"(hint: "number"): number;
                          "[toPrimitive]"(hint: string): string | number;
                          getDate(): number;
                          getDay(): number;
                          getFullYear(): number;
                          getHours(): number;
                          getMilliseconds(): number;
                          getMinutes(): number;
                          getMonth(): number;
                          getSeconds(): number;
                          getTime(): number;
                          getTimezoneOffset(): number;
                          getUTCDate(): number;
                          getUTCDay(): number;
                          getUTCFullYear(): number;
                          getUTCHours(): number;
                          getUTCMilliseconds(): number;
                          getUTCMinutes(): number;
                          getUTCMonth(): number;
                          getUTCSeconds(): number;
                          setDate(date: number): number;
                          setFullYear(year: number, month?: number, date?: number): number;
                          setHours(
                              hours: number,
                              min?: number,
                              sec?: number,
                              ms?: number,
                          ): number;
                          setMilliseconds(ms: number): number;
                          setMinutes(min: number, sec?: number, ms?: number): number;
                          setMonth(month: number, date?: number): number;
                          setSeconds(sec: number, ms?: number): number;
                          setTime(time: number): number;
                          setUTCDate(date: number): number;
                          setUTCFullYear(year: number, month?: number, date?: number): number;
                          setUTCHours(
                              hours: number,
                              min?: number,
                              sec?: number,
                              ms?: number,
                          ): number;
                          setUTCMilliseconds(ms: number): number;
                          setUTCMinutes(min: number, sec?: number, ms?: number): number;
                          setUTCMonth(month: number, date?: number): number;
                          setUTCSeconds(sec: number, ms?: number): number;
                          toDateString(): string;
                          toISOString(): string;
                          toJSON(key?: any): string;
                          toLocaleDateString(): string;
                          toLocaleDateString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleDateString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleString(): string;
                          toLocaleString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleTimeString(): string;
                          toLocaleTimeString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleTimeString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toString(): string;
                          toTimeString(): string;
                          toUTCString(): string;
                          valueOf(): number;
                      };
                      birthtimeMs: number;
                      blksize: number;
                      blocks: number;
                      ctime: {
                          "[toPrimitive]"(hint: "default"): string;
                          "[toPrimitive]"(hint: "string"): string;
                          "[toPrimitive]"(hint: "number"): number;
                          "[toPrimitive]"(hint: string): string | number;
                          getDate(): number;
                          getDay(): number;
                          getFullYear(): number;
                          getHours(): number;
                          getMilliseconds(): number;
                          getMinutes(): number;
                          getMonth(): number;
                          getSeconds(): number;
                          getTime(): number;
                          getTimezoneOffset(): number;
                          getUTCDate(): number;
                          getUTCDay(): number;
                          getUTCFullYear(): number;
                          getUTCHours(): number;
                          getUTCMilliseconds(): number;
                          getUTCMinutes(): number;
                          getUTCMonth(): number;
                          getUTCSeconds(): number;
                          setDate(date: number): number;
                          setFullYear(year: number, month?: number, date?: number): number;
                          setHours(
                              hours: number,
                              min?: number,
                              sec?: number,
                              ms?: number,
                          ): number;
                          setMilliseconds(ms: number): number;
                          setMinutes(min: number, sec?: number, ms?: number): number;
                          setMonth(month: number, date?: number): number;
                          setSeconds(sec: number, ms?: number): number;
                          setTime(time: number): number;
                          setUTCDate(date: number): number;
                          setUTCFullYear(year: number, month?: number, date?: number): number;
                          setUTCHours(
                              hours: number,
                              min?: number,
                              sec?: number,
                              ms?: number,
                          ): number;
                          setUTCMilliseconds(ms: number): number;
                          setUTCMinutes(min: number, sec?: number, ms?: number): number;
                          setUTCMonth(month: number, date?: number): number;
                          setUTCSeconds(sec: number, ms?: number): number;
                          toDateString(): string;
                          toISOString(): string;
                          toJSON(key?: any): string;
                          toLocaleDateString(): string;
                          toLocaleDateString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleDateString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleString(): string;
                          toLocaleString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleTimeString(): string;
                          toLocaleTimeString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleTimeString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toString(): string;
                          toTimeString(): string;
                          toUTCString(): string;
                          valueOf(): number;
                      };
                      ctimeMs: number;
                      dev: number;
                      gid: number;
                      ino: number;
                      mode: number;
                      mtime: {
                          "[toPrimitive]"(hint: "default"): string;
                          "[toPrimitive]"(hint: "string"): string;
                          "[toPrimitive]"(hint: "number"): number;
                          "[toPrimitive]"(hint: string): string | number;
                          getDate(): number;
                          getDay(): number;
                          getFullYear(): number;
                          getHours(): number;
                          getMilliseconds(): number;
                          getMinutes(): number;
                          getMonth(): number;
                          getSeconds(): number;
                          getTime(): number;
                          getTimezoneOffset(): number;
                          getUTCDate(): number;
                          getUTCDay(): number;
                          getUTCFullYear(): number;
                          getUTCHours(): number;
                          getUTCMilliseconds(): number;
                          getUTCMinutes(): number;
                          getUTCMonth(): number;
                          getUTCSeconds(): number;
                          setDate(date: number): number;
                          setFullYear(year: number, month?: number, date?: number): number;
                          setHours(
                              hours: number,
                              min?: number,
                              sec?: number,
                              ms?: number,
                          ): number;
                          setMilliseconds(ms: number): number;
                          setMinutes(min: number, sec?: number, ms?: number): number;
                          setMonth(month: number, date?: number): number;
                          setSeconds(sec: number, ms?: number): number;
                          setTime(time: number): number;
                          setUTCDate(date: number): number;
                          setUTCFullYear(year: number, month?: number, date?: number): number;
                          setUTCHours(
                              hours: number,
                              min?: number,
                              sec?: number,
                              ms?: number,
                          ): number;
                          setUTCMilliseconds(ms: number): number;
                          setUTCMinutes(min: number, sec?: number, ms?: number): number;
                          setUTCMonth(month: number, date?: number): number;
                          setUTCSeconds(sec: number, ms?: number): number;
                          toDateString(): string;
                          toISOString(): string;
                          toJSON(key?: any): string;
                          toLocaleDateString(): string;
                          toLocaleDateString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleDateString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleString(): string;
                          toLocaleString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleTimeString(): string;
                          toLocaleTimeString(
                              locales?: string | string[],
                              options?: DateTimeFormatOptions,
                          ): string;
                          toLocaleTimeString(
                              locales?: LocalesArgument,
                              options?: DateTimeFormatOptions,
                          ): string;
                          toString(): string;
                          toTimeString(): string;
                          toUTCString(): string;
                          valueOf(): number;
                      };
                      mtimeMs: number;
                      nlink: number;
                      rdev: number;
                      size: number;
                      uid: number;
                      isBlockDevice(): boolean;
                      isCharacterDevice(): boolean;
                      isDirectory(): boolean;
                      isFIFO(): boolean;
                      isFile(): boolean;
                      isSocket(): boolean;
                      isSymbolicLink(): boolean;
                  };
              }[],
              unknown,
          >,
      >

    • Parameters

      • source: string | readonly string[]
      • Optionaloptions: {
            absolute?: boolean;
            baseNameMatch?: boolean;
            braceExpansion?: boolean;
            caseSensitiveMatch?: boolean;
            concurrency?: number;
            cwd?: string;
            deep?: number;
            dot?: boolean;
            extglob?: boolean;
            followSymbolicLinks?: boolean;
            fs?: {
                lstat?: StatAsynchronousMethod;
                lstatSync?: StatSynchronousMethod;
                readdir?: ReaddirAsynchronousMethod;
                readdirSync?: ReaddirSynchronousMethod;
                stat?: StatAsynchronousMethod;
                statSync?: StatSynchronousMethod;
            };
            globstar?: boolean;
            ignore?: readonly string[];
            markDirectories?: boolean;
            objectMode?: boolean;
            onlyDirectories?: boolean;
            onlyFiles?: boolean;
            stats?: boolean;
            suppressErrors?: boolean;
            throwErrorOnBrokenSymbolicLink?: boolean;
            unique?: boolean;
        }
        • Optional Readonlyabsolute?: boolean

          Return the absolute path for entries.

          false
          
        • Optional ReadonlybaseNameMatch?: boolean

          If set to true, then patterns without slashes will be matched against the basename of the path if it contains slashes.

          false
          
        • Optional ReadonlybraceExpansion?: boolean

          Enables Bash-like brace expansion.

          true
          
        • Optional ReadonlycaseSensitiveMatch?: boolean

          Enables a case-sensitive mode for matching files.

          true
          
        • Optional Readonlyconcurrency?: number

          Specifies the maximum number of concurrent requests from a reader to read directories.

          os.cpus().length
          
        • Optional Readonlycwd?: string

          The current working directory in which to search.

          process.cwd()
          
        • Optional Readonlydeep?: number

          Specifies the maximum depth of a read directory relative to the start directory.

          Infinity
          
        • Optional Readonlydot?: boolean

          Allow patterns to match entries that begin with a period (.).

          false
          
        • Optional Readonlyextglob?: boolean

          Enables Bash-like extglob functionality.

          true
          
        • Optional ReadonlyfollowSymbolicLinks?: boolean

          Indicates whether to traverse descendants of symbolic link directories.

          true
          
        • Optional Readonlyfs?: {
              lstat?: StatAsynchronousMethod;
              lstatSync?: StatSynchronousMethod;
              readdir?: ReaddirAsynchronousMethod;
              readdirSync?: ReaddirSynchronousMethod;
              stat?: StatAsynchronousMethod;
              statSync?: StatSynchronousMethod;
          }

          Custom implementation of methods for working with the file system.

          fs.*
          
        • Optional Readonlyglobstar?: boolean

          Enables recursively repeats a pattern containing **. If false, ** behaves exactly like *.

          true
          
        • Optional Readonlyignore?: readonly string[]

          An array of glob patterns to exclude matches. This is an alternative way to use negative patterns.

          []
          
        • Optional ReadonlymarkDirectories?: boolean

          Mark the directory path with the final slash.

          false
          
        • Optional ReadonlyobjectMode?: boolean

          Returns objects (instead of strings) describing entries.

          false
          
        • Optional ReadonlyonlyDirectories?: boolean

          Return only directories.

          false
          
        • Optional ReadonlyonlyFiles?: boolean

          Return only files.

          true
          
        • Optional Readonlystats?: boolean

          Enables an object mode (objectMode) with an additional stats field.

          false
          
        • Optional ReadonlysuppressErrors?: boolean

          By default this package suppress only ENOENT errors. Set to true to suppress any error.

          false
          
        • Optional ReadonlythrowErrorOnBrokenSymbolicLink?: boolean

          Throw an error when symbolic link is broken if true or safely return lstat call if false.

          false
          
        • Optional Readonlyunique?: boolean

          Ensures that the returned entries are unique.

          true
          

      Returns Promise<Result<readonly string[], unknown>>