glob
external fun glob(pattern: String, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(matches)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)(source)
external fun glob(pattern: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(matches)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)(source)
Retrieves the files matching the specified pattern.
import { glob } from 'node:fs';
glob('*.js', (err, matches) => {
if (err) throw err;
console.log(matches);
});
Content copied to clipboard
Since
v22.0.0
external fun glob(pattern: String, options: GlobOptionsWithFileTypes, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(matches)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/fs/Dirent<*>>) -> Unit)(source)
external fun glob(pattern: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>, options: GlobOptionsWithFileTypes, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(matches)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<node/fs/Dirent<*>>) -> Unit)(source)
external fun glob(pattern: String, options: GlobOptionsWithoutFileTypes, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(matches)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)(source)
external fun glob(pattern: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>, options: GlobOptionsWithoutFileTypes, callback: (err: ErrnoException?, @R|kotlin/ParameterName|(name = String(matches)) ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>) -> Unit)(source)
external fun glob(pattern: String, options: GlobOptions, callback: (err: ErrnoException?, matches: Any) -> Unit)(source)
external fun glob(pattern: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>, options: GlobOptions, callback: (err: ErrnoException?, matches: Any) -> Unit)(source)
external fun glob(pattern: String, options: GlobOptionsWithFileTypes): ERROR CLASS: Symbol not found for js.iterable.AsyncIterator<node/fs/Dirent<*>>(source)
external fun glob(pattern: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>, options: GlobOptionsWithFileTypes): ERROR CLASS: Symbol not found for js.iterable.AsyncIterator<node/fs/Dirent<*>>(source)
external fun glob(pattern: String, options: GlobOptionsWithoutFileTypes): ERROR CLASS: Symbol not found for js.iterable.AsyncIterator<kotlin/String>(source)
external fun glob(pattern: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>, options: GlobOptionsWithoutFileTypes): ERROR CLASS: Symbol not found for js.iterable.AsyncIterator<kotlin/String>(source)
external fun glob(pattern: String, options: GlobOptions): ERROR CLASS: Symbol not found for js.iterable.AsyncIterator<kotlin/Any>(source)
external fun glob(pattern: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>, options: GlobOptions): ERROR CLASS: Symbol not found for js.iterable.AsyncIterator<kotlin/Any>(source)
external fun glob(pattern: String): ERROR CLASS: Symbol not found for js.iterable.AsyncIterator<kotlin/String>(source)
external fun glob(pattern: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>): ERROR CLASS: Symbol not found for js.iterable.AsyncIterator<kotlin/String>(source)
import { glob } from 'node:fs/promises';
for await (const entry of glob('*.js'))
console.log(entry);
Content copied to clipboard
Since
v22.0.0