{"id":21352115,"url":"https://github.com/wolfchamane/amjs-utils-fs","last_synced_at":"2025-03-16T04:42:06.719Z","repository":{"id":35033478,"uuid":"198831997","full_name":"Wolfchamane/amjs-utils-fs","owner":"Wolfchamane","description":"Provides set of top-level utilities for filesystem management","archived":false,"fork":false,"pushed_at":"2023-01-06T02:03:13.000Z","size":788,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T14:46:12.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Wolfchamane.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":"2019-07-25T12:58:48.000Z","updated_at":"2020-09-08T11:36:12.000Z","dependencies_parsed_at":"2023-01-15T12:26:23.647Z","dependency_job_id":null,"html_url":"https://github.com/Wolfchamane/amjs-utils-fs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolfchamane%2Famjs-utils-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolfchamane%2Famjs-utils-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolfchamane%2Famjs-utils-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolfchamane%2Famjs-utils-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wolfchamane","download_url":"https://codeload.github.com/Wolfchamane/amjs-utils-fs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826785,"owners_count":20354220,"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":[],"created_at":"2024-11-22T03:12:40.120Z","updated_at":"2025-03-16T04:42:06.373Z","avatar_url":"https://github.com/Wolfchamane.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @amjs/utils-fs 0.1.4\n\n![Statements](https://img.shields.io/badge/Statements-100%25-brightgreen.svg) ![Branches](https://img.shields.io/badge/Branches-100%25-brightgreen.svg) ![Functions](https://img.shields.io/badge/Functions-100%25-brightgreen.svg) ![Lines](https://img.shields.io/badge/Lines-100%25-brightgreen.svg)\n\n\u003e Provides set of top-level utilities for filesystem management\n\n## Installation\n\n```bash\n$ npm i @amjs/utils-fs\n```\n## Usage\n\nGiven the following tre:\n\n```\n/\n    folder/\n        file.txt\n        index.html\n```\n\n#### make-folder\n\nCreates a folder following a complete path address.\n\n```javascript\nconst { makeFolder } = require('@amjs/utils-fs');\nconst path = require('path');\n\nconst root = path.join('/', 'folder', 'new-folder'); // '/folder/new-folder'\nmakeFolder(root);\n```\n\nWill output following tree:\n\n```\n/\n    folder/\n        new-folder/\n        file.txt\n        index.html\n```\n\n#### scan-dir\n\nScans a folder returning an array with all contained file paths.\n\n```javascript\nconst { scanDir } = require('@amjs/utils-fs');\nconst path = require('path');\n\nconst root = path.join('/', 'folder');\nlet files = scanDir(root);\nconsole.log(files); // [ '/folder/file.txt', '/folder/index.html' ]\n\n// Use second argument to exclude files from output\nfiles = scanDir(root, [ path.join(root, 'file.txt') ];\nconsole.log(files); // [ '/folder/index.html' ]\n\n// Use third argument to filter output by a regular expression\nfiles = scanDir(root, [], /.+\\.m?js$/);\nconsole.log(files); // []\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfchamane%2Famjs-utils-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfchamane%2Famjs-utils-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfchamane%2Famjs-utils-fs/lists"}