{"id":20757602,"url":"https://github.com/dodevops/file-hierarchy","last_synced_at":"2026-05-06T18:35:54.857Z","repository":{"id":57235465,"uuid":"112339836","full_name":"dodevops/file-hierarchy","owner":"dodevops","description":"Turn an entire directory tree into a js-hierarchy node","archived":false,"fork":false,"pushed_at":"2018-01-16T10:12:20.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-14T20:15:46.337Z","etag":null,"topics":["filesystem","hierarchical","hierarchy","javascript","js-hierarchy","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/file-hierarchy","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dodevops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-28T13:36:43.000Z","updated_at":"2020-08-17T11:33:31.000Z","dependencies_parsed_at":"2022-08-31T20:50:53.215Z","dependency_job_id":null,"html_url":"https://github.com/dodevops/file-hierarchy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dodevops/file-hierarchy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Ffile-hierarchy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Ffile-hierarchy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Ffile-hierarchy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Ffile-hierarchy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dodevops","download_url":"https://codeload.github.com/dodevops/file-hierarchy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Ffile-hierarchy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267785958,"owners_count":24144124,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["filesystem","hierarchical","hierarchy","javascript","js-hierarchy","nodejs","typescript"],"created_at":"2024-11-17T09:43:21.456Z","updated_at":"2026-05-06T18:35:54.817Z","avatar_url":"https://github.com/dodevops.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file-hierarchy - Turn an entire directory tree into a js-hierarchy node\n\n[![Build Status](https://travis-ci.org/dodevops/file-hierarchy.svg?branch=master)](https://travis-ci.org/dodevops/file-hierarchy) [![Coverage Status](https://coveralls.io/repos/github/dodevops/file-hierarchy/badge.svg?branch=master)](https://coveralls.io/github/dodevops/file-hierarchy?branch=master)  [![npm](https://img.shields.io/npm/v/file-hierarchy.svg)](https://www.npmjs.com/package/file-hierarchy)\n\n## Introduction\n\nFile-Hierarchy provides a JS-Hierarchy Node implementation, that turns a directory tree into a JS-Hierarchy tree using\nthe `scan`-method.\n\nEvery directory entry is processed and its statistics data is gathered and saved. You can traverse the tree using\nJS-Hierarchy's standard `walk` feature.\n\nUnlike JS-Hierarchy, this module is not available for the browser (like, duh!).\n\n## Installation\n\nInstall the module using\n\n    npm install file-hierarchy --save\n\nIf you're using Typescript, you might want to add the following typings:\n\n    npm install @types/bluebird @types/loglevel @types/node --save-dev\n\n## Usage\n\nTypescript:\n\n```typescript\nimport { FileNode, ScanOptions } from '../lib/FileNode'\n\nnew FileNode().scan(new ScanOptions('/my/path'))\n  .then(\n    fileNode =\u003e {\n      console.log(fileNode.path)\n    }\n  )\n```\n\nJavascript:\n\n```javascript\nconst fileHierarchy = require('file-hierarchy')\n\nnew fileHierarchy.FileNode().scan(new fileHierarchy.ScanOptions('/my/path'))\n  .then(\n    fileNode =\u003e {\n      console.log(fileNode.path)\n    }\n  )\n```\n\nSee the [API-docs](https://dodevops.github.io/file-hierarchy/) for details.\n\n## Building\n\nTo test and build this package, simply use grunt:\n\n    grunt test","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodevops%2Ffile-hierarchy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdodevops%2Ffile-hierarchy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodevops%2Ffile-hierarchy/lists"}