Skip to main content
glob - fs - Node documentation
function glob

Usage in Deno

import { glob } from "node:fs";
glob(
pattern: string | string[],
callback: (
err: ErrnoException | null,
matches: string[],
) => void
,
): void

Retrieves the files matching the specified pattern.

Parameters

pattern: string | string[]
callback: (
err: ErrnoException | null,
matches: string[],
) => void

Return Type

void
glob(
pattern: string | string[],
callback: (
err: ErrnoException | null,
matches: Dirent[],
) => void
,
): void

Parameters

pattern: string | string[]
callback: (
err: ErrnoException | null,
matches: Dirent[],
) => void

Return Type

void
glob(
pattern: string | string[],
callback: (
err: ErrnoException | null,
matches: string[],
) => void
,
): void

Parameters

pattern: string | string[]
callback: (
err: ErrnoException | null,
matches: string[],
) => void

Return Type

void
glob(
pattern: string | string[],
options: GlobOptions,
callback: (
err: ErrnoException | null,
matches: Dirent[] | string[],
) => void
,
): void

Parameters

pattern: string | string[]
options: GlobOptions
callback: (
err: ErrnoException | null,
matches: Dirent[] | string[],
) => void

Return Type

void
Back to top