{"id":14953953,"url":"https://github.com/adafruit/atom-fsync-on-save","last_synced_at":"2026-01-15T22:56:56.016Z","repository":{"id":136777205,"uuid":"112764522","full_name":"adafruit/Atom-fsync-on-save","owner":"adafruit","description":"When saving to a CIRCUITPY drive, make sure the file is completely written out immediately.","archived":false,"fork":false,"pushed_at":"2019-02-27T02:27:24.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T23:14:10.331Z","etag":null,"topics":["atom-package","circuitpython"],"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/adafruit.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":"2017-12-01T16:57:11.000Z","updated_at":"2021-04-19T23:07:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"adfbbdbb-7d53-4501-9698-77be0d6be9b9","html_url":"https://github.com/adafruit/Atom-fsync-on-save","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"613368413957c291b8778a9d69f07be5b51352ec"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAtom-fsync-on-save","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAtom-fsync-on-save/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAtom-fsync-on-save/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAtom-fsync-on-save/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adafruit","download_url":"https://codeload.github.com/adafruit/Atom-fsync-on-save/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247094225,"owners_count":20882572,"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":["atom-package","circuitpython"],"created_at":"2024-09-24T13:01:03.578Z","updated_at":"2026-01-15T22:56:55.978Z","avatar_url":"https://github.com/adafruit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fsync-on-save\n\nWhen Atom saves a file, sometimes you need to flush all the\ndata to the storage device immediately. For instance, you might want to\nmake sure data is written to a persistent storage medium promptly, or\na file might be on on a removable drive that may be unplugged without\nnotice.\n\nThis simple package does an `fsync()` or equivalent to write all the\ndata immediately.  The `node.js` function `fs.fsyncSync()` is called\nafter the file is written.\n\nThe original motivation for this package was to make Atom be a safe\neditor for use with [Adafruit Industries CircuitPython](https://www.adafruit.com/circuitpython).\nCircuitPython will automatically reload and restart when a file is\nwritten to the `CIRCUITPY` drive. Several operating systems do not\nwrite all data and metadata to USB drives immediately. This\ndelayed-write behavior can cause auto-reload to read an incompletely\nwritten version of the updated file (such as `main.py` or `code.py`)\nwhen CircuitPython restarts. It can also cause the `CIRCUITPY`\nfilesystem to become corrupted if the board is unplugged or reset\nbefore the file is completely written.\n\nAs of this writing, this delayed-write behavior is noticeable on\nWindows and Linux, but not on MacOS. Note that Linux may still write\nadditional metata to `CIRCUITPY` a minute or so later after saving the\nfile, causing an auto-reload. That's a different problem which this\npackage cannot address.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Fatom-fsync-on-save","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadafruit%2Fatom-fsync-on-save","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Fatom-fsync-on-save/lists"}