{"id":20806296,"url":"https://github.com/nodesource/ah-fs","last_synced_at":"2025-05-11T17:31:42.951Z","repository":{"id":57174670,"uuid":"79830901","full_name":"nodesource/ah-fs","owner":"nodesource","description":"Tracks async hook events related to file system operations.","archived":true,"fork":false,"pushed_at":"2017-10-26T15:57:54.000Z","size":1213,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T14:09:41.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nodesource.github.io/ah-fs","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/nodesource.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":"2017-01-23T17:50:25.000Z","updated_at":"2025-01-30T21:17:43.000Z","dependencies_parsed_at":"2022-08-29T00:11:01.680Z","dependency_job_id":null,"html_url":"https://github.com/nodesource/ah-fs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fah-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fah-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fah-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fah-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodesource","download_url":"https://codeload.github.com/nodesource/ah-fs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253411550,"owners_count":21904150,"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-17T19:19:09.110Z","updated_at":"2025-05-11T17:31:42.702Z","avatar_url":"https://github.com/nodesource.png","language":"JavaScript","readme":"# ah-fs [![build status](https://secure.travis-ci.org/nodesource/ah-fs.svg?branch=master)](http://travis-ci.org/nodesource/ah-fs)\n\nTracks async hook events related to file system operations.\n\n## Installation\n\n    npm install ah-fs\n\n## [API](https://nodesource.github.io/ah-fs)\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### FileSystemActivityCollector\n\nInstantiates a FileSystemActivityCollector.\n\nExtends [ActivityCollector](https://github.com/nodesource/ah-collector) and thus\nexposes the same [public\nAPI](https://github.com/nodesource/ah-collector#api) with added\nfunctionality.\n\n**Parameters**\n\n-   `$0.start` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)\u003e** the start time of the process, i.e. the result of `process.hrtime()`\n-   `$0.stackCapturer` **StackCapturer?** [see ah-stack-capturer](https://github.com/nodesource/ah-stack-capturer) which\n    configures how and when stacks traces are captured and processed.By default a StackCapturer is used that captures stacks for all events for\n    file system related types: `FSREQWRAP`, `FSREQUESTWRAP` (optional, default `StackCapturer`)\n-   `$0.bufferLength` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** determines how many elements of Buffers are\n    captured. By default not Buffer data is captured. (optional, default `0`)\n-   `$0.stringLength` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** determines how much of each string is\n    captured. By default no string data is captured. (optional, default `0`)\n-   `$0.captureArguments` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** if `true` arguments of callbacks\n    are captured when they are processed. (optional, default `false`)\n-   `$0.captureSource` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** if `true` the source code of callbacks\n    is captured when they are processed. (optional, default `false`)\n\n### fileSystemActivityCollector.fileSystemActivities\n\nGetter that returns all activities related to file system operations.\n\nReturns **[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)\u0026lt;[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** fileSystemActivities\n\n### fileSystemActivityCollector.cleanAllResources\n\nCleans up all captured resources which means that they are processed,\nmeaningful data extracted and the reference to the actual resource removed\nso it can be GCed.\n\nResources are cleaned during `after` and `destroy` events, therefore\ncalling this function only affects those resources for which none of these\nevents have fired yet.\n\nReturns **[FileSystemActivityCollector](#filesystemactivitycollector)** fileSystemActivityCollector\n\n### fileSystemActivityCollector.stringifyBuffers\n\nFinds all buffers that are part of the resources, including arguments\npassed to callbacks and stringifies their value for the supplied\nencodings.\n\n**Parameters**\n\n-   `encodings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e?** specified for which encodings to create\n    strings. In order to creates strings for all encodings, pass\n    [stringify-buffer.encodings](https://github.com/nodesource/stringify-buffer#stringifybufferencodings) (optional, default `'utf8','hex'`)\n\nReturns **[FileSystemActivityCollector](#filesystemactivitycollector)** fileSystemActivityCollector\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesource%2Fah-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodesource%2Fah-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesource%2Fah-fs/lists"}