{"id":15496938,"url":"https://github.com/lencx/deno-getfiles","last_synced_at":"2026-04-12T23:45:00.570Z","repository":{"id":62421412,"uuid":"272144804","full_name":"lencx/deno-getfiles","owner":"lencx","description":"📂 Recursively get all files in a directory","archived":false,"fork":false,"pushed_at":"2020-07-10T14:22:21.000Z","size":16,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T17:48:03.366Z","etag":null,"topics":["deno","fileinfo","fs","getfiles"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lencx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-14T06:18:14.000Z","updated_at":"2025-01-06T21:18:42.000Z","dependencies_parsed_at":"2022-11-01T17:31:51.754Z","dependency_job_id":null,"html_url":"https://github.com/lencx/deno-getfiles","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lencx/deno-getfiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lencx%2Fdeno-getfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lencx%2Fdeno-getfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lencx%2Fdeno-getfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lencx%2Fdeno-getfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lencx","download_url":"https://codeload.github.com/lencx/deno-getfiles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lencx%2Fdeno-getfiles/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266187044,"owners_count":23889905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","fileinfo","fs","getfiles"],"created_at":"2024-10-02T08:29:36.154Z","updated_at":"2025-10-17T17:09:32.242Z","avatar_url":"https://github.com/lencx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# getFiles\n\n\u003e Recursively get all files in a directory\n\n[![getfiles ci](https://github.com/lencx/deno-getfiles/workflows/getfiles-ci/badge.svg)](https://github.com/lencx/deno-getfiles/actions)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/lencx/deno-getfiles)\n[![license](https://img.shields.io/github/license/lencx/deno-getfiles)](https://github.com/lencx/deno-getfiles/blob/master/LICENSE)\n[![Made by lencx](https://img.shields.io/badge/Made%20by%20-lencx-inactive)](https://github.com/lencx)\n\n## Usage\n\n\u003e needs --allow-read privilege\n\n```ts\nimport getFiles, { exists, fileExt, trimPath, fmtFileSize } from \"https://deno.land/x/getfiles/mod.ts\";\n\n// root path: './' or '.'\nconst files = getFiles('./');\n\n// include files\nconst files2 = getFiles({\n  root: './',\n  include: ['examples'],\n  hasInfo: true,\n  // ignore: ['examples/include.ts'],\n});\n\n// exclude files\nconst files3 = getFiles({\n  root: './',\n  exclude: ['.git'],\n  // ignore: ['*.ts'],\n});\n\n// if a file exists\nconst existFile = await exists('mod.ts');\nconsole.log(existFile);\n```\n\n## Methods\n\n* [fs] - `getFiles`: default export\n* [fs] - `findFile`\n* [utils] - `exists`\n* [utils] - `fileExt`: get file extensions\n* [utils] - `trimPath`: trim path\n* [utils] - `fmtFileSize`: converting file size in bytes to human readable string\n* [utils] - `isStr`\n\n## API\n\n\u003e getFiles\n\n| Option  | Type     | Description                   | Example                                                          |\n| ------- | -------- | ----------------------------- | ---------------------------------------------------------------- |\n| root    | string   | directory                     | {root: '.'}                                                      |\n| include | string[] | include directory             | {root: '.', include: ['examples']}                               |\n| exclude | string[] | exclude directory             | {root: '.', exclude: ['.git']}                                   |\n| ignore  | string[] | ignore file rule              | {root: '.', ignore: ['\\*.md', '\\*\\*/\\*.ts', 'examples/tree.ts']} |\n| hasInfo | boolean  | file details, default `false` | {root: '.', hasInfo: true}                                       |\n\n## Examples\n\n* [tree](./examples/tree.ts)\n* [include](./examples/include.ts)\n* [exclude](./examples/exclude.ts)\n* [cmd](https://github.com/lencx/deno-example/blob/master/cmd.ts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flencx%2Fdeno-getfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flencx%2Fdeno-getfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flencx%2Fdeno-getfiles/lists"}