{"id":19097193,"url":"https://github.com/atmajs/atma-io","last_synced_at":"2026-02-09T08:05:00.500Z","repository":{"id":10266567,"uuid":"12378621","full_name":"atmajs/atma-io","owner":"atmajs","description":"NodeJS IO Classes","archived":false,"fork":false,"pushed_at":"2024-12-12T23:58:18.000Z","size":2168,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-22T22:25:26.409Z","etag":null,"topics":["filesystem","io","middleware"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/atmajs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-08-26T12:31:38.000Z","updated_at":"2024-12-12T23:58:22.000Z","dependencies_parsed_at":"2024-01-15T19:06:56.244Z","dependency_job_id":"87f1b991-4c04-4f50-9533-3c4aa14b393e","html_url":"https://github.com/atmajs/atma-io","commit_stats":{"total_commits":194,"total_committers":2,"mean_commits":97.0,"dds":"0.19587628865979378","last_synced_commit":"3ee1d640e9ceaa8aca29831eb77d8d29467ea57e"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/atmajs/atma-io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Fatma-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Fatma-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Fatma-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Fatma-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atmajs","download_url":"https://codeload.github.com/atmajs/atma-io/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atmajs%2Fatma-io/sbom","scorecard":{"id":214862,"data":{"date":"2025-08-11","repo":{"name":"github.com/atmajs/atma-io","commit":"2aa640ea8d489deda520a43f041eeb0ff56b0a9a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-p28h-cc7q-c4fg","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-q9mw-68c2-j6m5","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-rmxg-73gg-4p98","Warn: Project is vulnerable to: GHSA-6c3j-c64m-qhgq","Warn: Project is vulnerable to: GHSA-gxr4-xjj5-5px2","Warn: Project is vulnerable to: GHSA-jpcq-cgw6-v4j6","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-f9cm-p3w6-xvr3","Warn: Project is vulnerable to: GHSA-jjv7-qpx3-h62q","Warn: Project is vulnerable to: GHSA-gqgv-6jq5-jjj9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-v2p6-4mp7-3r9v","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T01:27:59.616Z","repository_id":10266567,"created_at":"2025-08-17T01:27:59.616Z","updated_at":"2025-08-17T01:27:59.616Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29259476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","io","middleware"],"created_at":"2024-11-09T03:39:22.549Z","updated_at":"2026-02-09T08:05:00.480Z","avatar_url":"https://github.com/atmajs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## FileSystem Module\n\n----\n\n\u003cp align='center'\u003e\n    \u003cimg src='assets/background.jpg'/\u003e\n\u003c/p\u003e\n\n----\n\n[![Build Status](https://dl.circleci.com/status-badge/img/gh/atmajs/atma-io/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/atmajs/atma-io/tree/master)\n[![NPM version](https://badge.fury.io/js/atma-io.svg)](http://badge.fury.io/js/atma-io)\n\nFeatures:\n\n- File Class.\n- Directory Class.\n- File IO Middlewares to preprocess reads and writes actions.\n- File Transport middleware for custom file protocols, e.g. `s3://uploads/avatar.png`\n- Sync and Async\n- Safe Files to ensure thread-safe and process-safe file writes.\n- File-locks to make custom process-safe actions easy to implement.\n- File watcher: cross-platform file watchers.\n- AES-256 Encryption\n- HTTP Transport: `get`, `post`, `put`, `head` and `delete` methods to handle files.\n\n\n----\n[📚 API Documentation](https://docs.atma.dev/atma-io)\n----\n\n\u003e In comparison to NodeJS sync-async contract: all functions with generic name are synchronous, and the `**Async` are asynchronous with the same interface. Sync versions never throw exceptions and are designed to be used in not performance critical applications, like bash scripts, etc. _Go `Async`._\n\n- [File](#file)\n    - [API](#file-methods)\n    - [Cache](#cache)\n    - [Middleware](#file-middleware)\n    - [Virtual File](#virtual-files)\n- [Directory](#directory)\n    - [API](#directory-methods)\n\n### File\n\n#### File methods\n\n##### File constructor\n```ts\nimport { File } from 'atma-io'\n\nconst file = new File('./test.txt');\n```\n\nPath is relative to the `cwd` (_except windows os, when drive letter is used_). To specify system absolute path, use `file://` protocol.\n\n##### `read` `readAsync`\nRead file's content. If `encoding` is set to null raw `Buffer` is returned.\nFor each `read` middleware pipeline is used, to skip it, set `skipHooks` to true.\n\n\u003e Hooks will be per default executed. For example, when reading from `*.json` file the string will be deserialized to json object\n\n```ts\nlet content = file.read\u003cTOut = string\u003e( options?: {\n    encoding?: 'buffer' | 'utf8' //\u003e default 'utf8'\n    skipHooks?: boolean //\u003e false\n    aes256?: { secret: string }\n});\n\nlet content = await file.readAsync \u003cTOut = string\u003e (options?: {\n    encoding?: 'buffer' | 'utf8', //\u003e 'utf8'\n    skipHooks?: boolean //\u003e false\n    aes256?: { secret: string }\n});\n```\n\n##### `readRange` `readRangeAsync`\nGet bytes or string for a range from the file\n\n```ts\nlet content = file.readRange(position, length);\n\nlet content = await file.readRangeAsync(position, length)\n```\n\n##### `write` `writeAsync`\n\n\u003e Hooks will be per default executed. For example, when writing to `*.json` file and providing an object, this object will be serialized to json string\n\n```ts\nfile.write(string | Buffer | any, options?: {\n    skipHooks?: boolean\n    aes256?: { secret: string }\n})\n\nfile\n    .writeAsync(content: string | Buffer | any, options?: {\n        skipHooks?: boolean\n        aes256?: { secret: string }\n    })\n    .then(() =\u003e {}, (err) =\u003e {})\n```\n\n\n##### `append` `appendAsync`\n```ts\nfile.append(content: string)\n\nawait file.appendAsync(string);\n```\n\n##### `exists` `existsAsync`\n```ts\nlet b: boolean = file.exists()\n\nlet b: boolean = await file.existsAsync();\n```\n\n##### `copyTo` `copyToAsync`\n```ts\ninterface IFileCopyOpts {\n    silent?: boolean\n    baseSource?: string\n}\n/**\n * @param path: Target file path or directory, when ends with slash\n */\nfile.copyTo(path: string, opts?: IFileCopyOpts): boolean\n\nfile.copyToAsync(path: string, opts?: IFileCopyOpts): Promise\u003cboolean\u003e\n```\n\n##### `rename` `renameAsync`\n```ts\nfile.rename(filename: string)\n\nfile.renameAsync(filename: string): Promise\u003cvoid\u003e\n```\n\n##### `replace` `replaceAsync`\nReads the content as string, replaces the matches and writes the result.\nExpected arguments are the same as for JavaScripts string `replace`.\nReturns new content.\n\n```ts\nfile.replace(search: string | RegExp, replacer: string | Function): string\n\nfile.replaceAsync(search: string | RegExp, replacer: string | Function): Promise\u003cstring\u003e\n```\n\n##### `remove` `removeAsync`\n```ts\nfile.remove(): boolean\n\nfile.removeAsync(): Promise\u003cboolean\u003e\n```\n\n##### `watch`\n\nWatch file for changes\n\n```ts\nfile.watch(cb: (path) =\u003e void)\n```\n\n##### unwatch\n```ts\nfile.unwatch(cb?: (path) =\u003e void): boolean\n```\n\n#### Cache\nEach `read` will be cached. To control cache behavior use next methods:\n\n##### clearCache\n```ts\nFile.clearCache(\u003c?string\u003e path);\n```\nWhen `path` is `null`, then all cache is dropped.\n##### disableCache\n```ts\nFile.disableCache();\n```\n##### enableCache\n```ts\nFile.disableCache();\n```\n\n#### short forms\nThere are some static methods, so that there is no need to initialize the File instance.\n```ts\nFile[method] //\u003e Function(filepath, [..args])\n// methods:\n        'exists'\n        'existsAsync'\n        'read'\n        'readAsync'\n        'readRange'\n        'readRangeAsync'\n        'write'\n        'writeAsync'\n        'append'\n        'appendAsync'\n        'remove'\n        'removeAsync'\n        'replace'\n        'replaceAsync'\n        'rename'\n        'renameAsync'\n        'copyTo'\n        'copyToAsync'\n\n// sample\nFile\n    .readAsync('/baz.txt')\n    .done(function(content){\n        console.log(content);\n    })\n    .fail(function(error){\n        console.error(error);\n    })\n    ;\n```\n\n### File Middleware\nMiddleware pattern is used for all reads and writes. It can be used, for example, to compile coffee script to javascript on the fly. Or when reading `*.yml` file, the resulted content is not a YAML string, but already parsed object.\n\n#### Extensions\n\nTo get the idea, look at the hook definition sample:\n```ts\nimport { File } from 'atma-io'\nFile.registerExtensions({\n    'coffee':[\n        'conditions:read',\n        'coffee-compiler:read',\n        'uglify:write'\n    ]\n});\n```\nEach middleware has unique name and is registered in this way:\n```ts\nimport { File } from 'atma-io'\nFile.middleware['coffee'] = {\n    read: function(\u003cio.File\u003e file, \u003cObject\u003e config){\n        let coffee = require('coffee-script');\n        file.content = coffee.compile(file.content);\n    },\n    write: function(\u003cio.File\u003e file, \u003cObject\u003e config){\n        // ... do smth with `content` before disk write\n    }\n};\n```\n\n#### Advanced middleware\n```ts\nimport { File } from 'atma-io'\nFile\n    .getHookHandler()\n    .register({\n        regexp: \u003cRegExp\u003e,\n        method: \u003c'read'|'write'\u003e,\n        handler: \u003cFunction | Object\u003e handler,\n        zIndex: \u003c?Number\u003e // default: 0\n    });\n```\n\nPath is matched by the regexp. The greater `zIndex` is, the later it is called in the pipeline, otherwise the handlers are called in the order they were registered.\n\n#### Embedded middlewares\n_Lately will be converted into plugins, @see [Plugins](#middleware-plugins)_\n- read\n    - coffee ( -\u003e javascript )\n    - markdown ( -\u003e html )\n    - jshint ( -\u003e run jshint )\n    - json ( -\u003e JSON.parse is used )\n    - yml ( -\u003e YAML parser is used )\n\n- write\n    - uglify ( -\u003e Minify source before write)\n    - cssmin ( -\u003e Minify source before write)\n    - yml ( -\u003e stringify object to yml string )\n    - json ( -\u003e stringify object to json )\n\n#### Middleware Plugins\nThere additional `read`/`write` middlewares as atma plugins:\n\n###### `atma plugin install NAME`\n\n- [`atma-loader-ts`](https://github.com/tenbits/atma-loader-ts) - Compiles [Typescript]\n- [`atma-loader-less`](https://github.com/atmajs/atma-loader-less) - Compiles Less\n- [`atma-loader-sass`](https://github.com/atmajs/atma-loader-sass) - Compiles SASS\n- [`atma-io-middleware-yml`](https://github.com/tenbits/atma-io-middleware-yml) - Parse YML and returns the Object\n- [`atma-io-transport-s3`](https://github.com/atmajs/atma-io-transport-s3) - Read/Save `s3://` files paths from/to S3 storage\n\n\n###### Combined middlewares\nFor example, you want to use Traceur middelware and jshint for reading `js` files:\n_via javascript_\n```ts\nFile.registerExtensions({\n    js: ['hint:read', 'atma-loader-ts:read' /* ... */],\n})\n```\n_via `package.json`_\n```json\n...\n\"atma\": {\n    \"settings\" : {\n        \"io\": {\n            \"extensions\": {\n                \"js\": [ \"hint:read\", \"atma-loader-ts:read\" ]\n            }\n        }\n    }\n}\n```\n\n### **Virtual** Files\n\nDefine with RegExp a File Handler to completely override  the read/write/exists/remove behavior.\n\n```ts\nimport { File } from 'atma-io'\nFile\n    .getFactory()\n    .registerHandler(/defaults\\.json$/i, class {\n        exists (){\n            return true;\n        },\n        read (){\n            return { foo: 'bar' };\n        }\n    });\n\n```\n\n\n### Directory\n\n#### Directory methods\n\n##### Constructor\n```ts\nimport { Directory } from 'atma-io'\nlet dir = new Directory('src/');\n```\nPath is always relative to the `cwd` (_except windows os, when drive letter is used_). To specify system absolute path, use `file://` protocol.\n\n##### exists\n```ts\ndir.exists()//\u003e boolean\n```\n##### existsAsync\n```ts\ndir.existsAsync()//\u003e Deferred\n```\n##### readFiles\n```ts\ndir.readFiles(\u003c?string\u003e pattern).files // Array\u003cio.Files\u003e\n```\nGet list of all files in the directory. `pattern` is a glob pattern.\n```ts\n// all javascript files, also from sub-directories\npattern = '*.js';\n// only from base directory\npattern = '/*.js'\n// only from sub-directories\npattern = '**/*.js'\n\ndir.readFiles(pattern).files\n```\n##### readFilesAsync\n```ts\nlet files: File[] = await dir.readFilesAsync(globPattern?);\n```\n\n##### copyTo\nCopy `files` to destination directory. Before copying `dir.readFiles` can be called to copy only specific files.\n```ts\ndir.copyTo(destination: string)\n```\n##### copyToAsync\n```ts\ndir.copyToAsync(destination: string) //\u003e Deferred\n```\n\n##### rename\n```ts\ndir.rename(\u003cstring\u003e folderName);\n```\n##### renameAsync\n```ts\ndir.renameAsync(\u003cstring\u003e folderName) //\u003e Deferred\n```\n##### remove\nRemoves all content recursively and the folder itself\n```ts\ndir.remove() //\u003e boolean\n```\n\n##### removeAsync\n```ts\ndir.removeAsync()\n```\n\n##### ensure\n```ts\ndir.ensure()\n```\nCreates directory structure, if not already exists.\n##### ensureAsync\n```ts\ndir.ensureAsync()\n```\n\n##### watch\n```ts\ndir.watch(callback)\n```\nWatch directory for changes\n##### unwatch\n```ts\ndir.unwatch(callback)\n```\n\n##### short forms\nThere are some static methods, so that there is no need to initialize the Directory instance.\n```ts\nDirectory[method] //\u003e Function(dirpath, [..args])\n// methods:\n    'exists'\n    'existsAsync'\n    'readFiles'\n    'readFilesAsync'\n    'ensure'\n    'ensureAsync'\n    'remove'\n    'removeAsync'\n    'copyTo'\n    'copyToAsync'\n\n// sample\nio\n    .Directory\n    .readFilesAsync('sub/', '**.js')\n    .done(function(files))\n    .fail(function(error))\n```\n\n\n----\n(c) MIT - Atma.js Project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatmajs%2Fatma-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatmajs%2Fatma-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatmajs%2Fatma-io/lists"}