import { getFilesList } from "https://deno.land/x/fathym_common@v0.2.167/src/common/path/getFilesList.ts";
Retrieves a list of files in the specified directory, optionally filtering by extension. Use the meta to give the file list current context.
Examples
From direct import
From direct import
import { getFilesList } from '@fathym/common/path';
const fileList = await getFilesList({
Directory: '/path/to/directory',
});
From common import - With Meta and Extensions
From common import - With Meta and Extensions
import { getFilesList } from '@fathym/common';
const fileList = await getFilesList({
Directory: '/path/to/directory',
Extensions: ['.txt', '.js'],
}, import.meta);
Parameters
flReq: FileListRequest
The request for the file list.
optional
meta: ImportMetaThe meta to give the file list current context.