Fglob
Bun

function

fs.glob

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

Retrieves the files matching the specified pattern.

import { glob } from 'node:fs';

glob('*.js', (err, matches) => {
  if (err) throw err;
  console.log(matches);
});
function glob(
pattern: string | readonly string[],
callback: (err: null | ErrnoException, matches: Dirent<string>[]) => void
): void;

Retrieves the files matching the specified pattern.

import { glob } from 'node:fs';

glob('*.js', (err, matches) => {
  if (err) throw err;
  console.log(matches);
});
function glob(
pattern: string | readonly string[],
callback: (err: null | ErrnoException, matches: string[]) => void
): void;

Retrieves the files matching the specified pattern.

import { glob } from 'node:fs';

glob('*.js', (err, matches) => {
  if (err) throw err;
  console.log(matches);
});
function glob(
pattern: string | readonly string[],
options: GlobOptions,
callback: (err: null | ErrnoException, matches: string[] | Dirent<string>[]) => void
): void;

Retrieves the files matching the specified pattern.

import { glob } from 'node:fs';

glob('*.js', (err, matches) => {
  if (err) throw err;
  console.log(matches);
});