{"id":22239624,"url":"https://github.com/nodeclient/list-content","last_synced_at":"2025-07-26T16:37:05.752Z","repository":{"id":143940430,"uuid":"291554094","full_name":"Nodeclient/list-content","owner":"Nodeclient","description":"List Files in a Directory","archived":false,"fork":false,"pushed_at":"2020-08-31T20:57:54.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T09:23:00.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/Nodeclient.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-30T21:22:09.000Z","updated_at":"2020-11-19T16:25:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e2d6d5f-1509-4fa2-a6a4-67e96f8450b3","html_url":"https://github.com/Nodeclient/list-content","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Flist-content","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Flist-content/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Flist-content/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nodeclient%2Flist-content/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nodeclient","download_url":"https://codeload.github.com/Nodeclient/list-content/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245440577,"owners_count":20615633,"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-12-03T03:20:25.328Z","updated_at":"2025-03-25T10:15:43.020Z","avatar_url":"https://github.com/Nodeclient.png","language":"JavaScript","readme":"## List Files in a Directory (files,folder,subfolder)\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n\n![news](https://raw.githubusercontent.com/Nodeclient/list-content/master/banner.jpg)\n\n## (GLOBAL) Install  \n```\nnpm install list-content -g\n```\n\n## (.ts) Typescript\n```js\n   import {default as test} from 'list-content';\n        let newdir = new test.ls();\n\n```\n## (.js) Javascript\n```js\n    const test = require('list-content').default;\n        let newdir = new test.ls();\n```\n## Function\n```js\nnewdir.ListDirectory(\"D:/list_content/\",function (data:any,err:any) {\n    for (const item of data) {\n        if(item.files.length \u003e 0){\n            for (const iterator of item.files) {\n                console.log( item.folder ,\"-\u003e\", iterator);\n            }\n        } else {\n            console.log( item.folder ,\"-\u003e\", \"EMPTY_FOLDER\"); // Empty folder\n        }\n    }\n})\n```\n\n## Output \n```sh\n    .  -\u003e test.js\n    .  -\u003e test.ts\n    .\\dev -\u003e main.d.ts\n    .\\dev -\u003e main.js\n    .\\dev -\u003e package.json\n    .\\dev -\u003e README.md\n    .\\dev\\src  -\u003e directory.d.ts\n    .\\dev\\src  -\u003e directory.js\n    .\\dev\\test -\u003e test.d.ts\n    .\\dev\\test -\u003e test.js\n    .\\dev\\dist -\u003e EMPTY_FOLDER\n```\n\n## License\n\nCopyright (c) 2018  | https://www.npmjs.com/~nodeclient\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[npm-image]: https://img.shields.io/npm/v/list-content.svg?style=flat\n[npm-url]: https://npmjs.org/package/list-content\n[downloads-image]: https://img.shields.io/npm/dm/list-content.svg?style=flat\n[downloads-url]: https://npmjs.org/package/list-content\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeclient%2Flist-content","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodeclient%2Flist-content","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeclient%2Flist-content/lists"}