fynjs API
    Preparing search index...

    Function filterScanDirSync

    • sync version of filter scan dir

      Parameters

      • Optionaloptions: string

      Returns string[]

    • sync version of filter scan dir

      Parameters

      Returns GroupingResult

    • sync version of filter scan dir

      Parameters

      Returns GroupingResult

    • sync version of filter scan dir

      Parameters

      Returns GroupingResult

    • sync version of filter scan dir

      Parameters

      • options: {
            concurrency?: number;
            cwd?: string;
            filter?: FilterCallback<Stats>;
            filterDir?: FilterCallback<Stats>;
            filterExt?: string | string[];
            fullStat?: true;
            gitignore?: GitignoreParser;
            ignoreDirs?: string | string[];
            ignoreExt?: string | string[];
            includeDir?: boolean;
            includeSymlink?: boolean;
            maxLevel?: number;
            pathSep?: string;
            prefilter?: (file: string, path: string, entry: Dirent) => boolean;
            prefix?: string;
            prependCwd?: boolean;
            rethrowError?: boolean;
            sortFiles?: boolean;
        }
        • Optionalconcurrency?: number

          for async version only - maximum directories reading entries or metadata concurrently. Default: 50. Ancestors waiting for child directories do not consume a slot.

          • Set this to 0 or 1 to disable concurrent mode

          NOTE: setting this to a very large number, or Infinity, could potentially increase performance very significantly, however, there is a dimishing return and more memory usage, so the default is already fairly good.

        • Optionalcwd?: string

          current working directory to start scanning

        • Optionalfilter?: FilterCallback<Stats>

          callback to filter files.

        • OptionalfilterDir?: FilterCallback<Stats>

          callback to filter directories.

        • OptionalfilterExt?: string | string[]

          array or string of extensions to include only, apply after ignoreExt

        • OptionalfullStat?: true

          use fs.lstat to get stat of each file, instead of readir's withFileTypes option.

          • Default: true - for significant performance improvement, set this to false
        • Optionalgitignore?: GitignoreParser

          parse ancestor repository and nested .gitignore rules; disabled when omitted

        • OptionalignoreDirs?: string | string[]

          directory basenames to skip at every depth, before reading metadata or children

        • OptionalignoreExt?: string | string[]

          array or string of extensions to ignore. ext must include ., ie: ".js"

        • OptionalincludeDir?: boolean

          include directories in result

        • OptionalincludeSymlink?: boolean

          include symlinks in result. When includeDir is false, all symlinks are skipped unless this is true, links to files as well as links to directories. When includeDir is true, this option has no effect and symlinks go through the normal filters. Symlinks are never followed.

        • OptionalmaxLevel?: number

          zero base max level of directories to recurse into. Default: Infinity

        • OptionalpathSep?: string

          path separator to use to join entries in output paths. Filesystem calls always use /.

          • Default: path.posix.sep
          • If you didn't specify this, then cwd is automatically converted to use /.
        • Optionalprefilter?: (file: string, path: string, entry: Dirent) => boolean

          synchronous entry filter before lstat; returning false also prunes directories. Requires fullStat to be true (the default). Throws when fullStat is false.

        • Optionalprefix?: string

          prefix to add to the paths to scan. It's applied after cwd.

          • The prefix will be in the resulting paths. Useful if you want to scan a dir further down from cwd but you don't want to prepend CWD to the resulting paths.
        • OptionalprependCwd?: boolean

          prepend CWD to paths returned

        • OptionalrethrowError?: boolean

          set to true to throw errors instead of ignoring them

        • OptionalsortFiles?: boolean

          sort files from each dir

      Returns string[]

    • sync version of filter scan dir

      Parameters

      Returns string[]

    • sync version of filter scan dir

      Parameters

      • Optionaloptions: {
            concurrency?: number;
            cwd?: string;
            filter?: FilterCallback<Dirent<string> | Stats>;
            filterDir?: FilterCallback<Dirent<string> | Stats>;
            filterExt?: string | string[];
            fullStat?: boolean;
            gitignore?: GitignoreParser;
            ignoreDirs?: string | string[];
            ignoreExt?: string | string[];
            includeDir?: boolean;
            includeSymlink?: boolean;
            maxLevel?: number;
            pathSep?: string;
            prefilter?: (file: string, path: string, entry: Dirent) => boolean;
            prefix?: string;
            prependCwd?: boolean;
            rethrowError?: boolean;
            sortFiles?: boolean;
        }
        • Optionalconcurrency?: number

          for async version only - maximum directories reading entries or metadata concurrently. Default: 50. Ancestors waiting for child directories do not consume a slot.

          • Set this to 0 or 1 to disable concurrent mode

          NOTE: setting this to a very large number, or Infinity, could potentially increase performance very significantly, however, there is a dimishing return and more memory usage, so the default is already fairly good.

        • Optionalcwd?: string

          current working directory to start scanning

        • Optionalfilter?: FilterCallback<Dirent<string> | Stats>

          callback to filter files.

        • OptionalfilterDir?: FilterCallback<Dirent<string> | Stats>

          callback to filter directories.

        • OptionalfilterExt?: string | string[]

          array or string of extensions to include only, apply after ignoreExt

        • OptionalfullStat?: boolean

          use fs.lstat to get stat of each file, instead of readir's withFileTypes option.

          • Default: true - for significant performance improvement, set this to false
        • Optionalgitignore?: GitignoreParser

          parse ancestor repository and nested .gitignore rules; disabled when omitted

        • OptionalignoreDirs?: string | string[]

          directory basenames to skip at every depth, before reading metadata or children

        • OptionalignoreExt?: string | string[]

          array or string of extensions to ignore. ext must include ., ie: ".js"

        • OptionalincludeDir?: boolean

          include directories in result

        • OptionalincludeSymlink?: boolean

          include symlinks in result. When includeDir is false, all symlinks are skipped unless this is true, links to files as well as links to directories. When includeDir is true, this option has no effect and symlinks go through the normal filters. Symlinks are never followed.

        • OptionalmaxLevel?: number

          zero base max level of directories to recurse into. Default: Infinity

        • OptionalpathSep?: string

          path separator to use to join entries in output paths. Filesystem calls always use /.

          • Default: path.posix.sep
          • If you didn't specify this, then cwd is automatically converted to use /.
        • Optionalprefilter?: (file: string, path: string, entry: Dirent) => boolean

          synchronous entry filter before lstat; returning false also prunes directories. Requires fullStat to be true (the default). Throws when fullStat is false.

        • Optionalprefix?: string

          prefix to add to the paths to scan. It's applied after cwd.

          • The prefix will be in the resulting paths. Useful if you want to scan a dir further down from cwd but you don't want to prepend CWD to the resulting paths.
        • OptionalprependCwd?: boolean

          prepend CWD to paths returned

        • OptionalrethrowError?: boolean

          set to true to throw errors instead of ignoring them

        • OptionalsortFiles?: boolean

          sort files from each dir

      Returns string[]