{"id":21700452,"url":"https://github.com/elliotekj/atomic_writes","last_synced_at":"2025-03-20T15:43:09.577Z","repository":{"id":199985529,"uuid":"704602547","full_name":"elliotekj/atomic_writes","owner":"elliotekj","description":"LWW, FWW \u0026 serialized atomic file writes in Elixir","archived":false,"fork":false,"pushed_at":"2023-10-18T11:10:44.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T09:16:29.563Z","etag":null,"topics":["atomic","elixir","serializer"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elliotekj.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}},"created_at":"2023-10-13T16:03:25.000Z","updated_at":"2023-12-01T10:21:51.000Z","dependencies_parsed_at":"2023-10-15T01:46:08.116Z","dependency_job_id":null,"html_url":"https://github.com/elliotekj/atomic_writes","commit_stats":null,"previous_names":["elliotekj/atomic_writes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotekj%2Fatomic_writes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotekj%2Fatomic_writes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotekj%2Fatomic_writes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotekj%2Fatomic_writes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elliotekj","download_url":"https://codeload.github.com/elliotekj/atomic_writes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244644995,"owners_count":20486905,"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":["atomic","elixir","serializer"],"created_at":"2024-11-25T20:14:22.401Z","updated_at":"2025-03-20T15:43:09.555Z","avatar_url":"https://github.com/elliotekj.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AtomicWrites: LWW, FWW \u0026 Serialized Atomic File Writes in Elixir\n\nPerform last-write-wins, first-write-wins or serialized atomic file writes in\nElixir with **AtomicWrites**. The basic idea is that writes are made to a\ntemporary file and then moved when the write is complete. By default, the\ntemporary write is made to the same file system (so that the move is also\natomic) and the move will overwrite any existing file (LWW). Both of these\noptions are configurable.\n\n## LWW Atomic Writes\n\n```elixir\nAtomicWrites.write(\"Atomically written content.\", path: \"example.txt\")\n```\n\n## FWW Atomic Writes\n\n```elixir\nAtomicWrites.write(\"Atomically written content.\", path: \"example.txt\", overwrite?: false)\n```\n\n## Serialized Atomic Writes\n\n``` elixir\nalias AtomicWrites.AtomicFile\n\n{:ok, pid} = AtomicFile.start_link(path: \"example.txt\")\nAtomicFile.write(pid, \"Serialized, atomically written content.\")\n```\n\n## Installation\n\nThe package can be installed by adding `atomic_writes` to your list of\ndependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:atomic_writes, \"~\u003e 1.1\"}\n  ]\nend\n```\n\n## Documentation\n\nThe documentation is published at \u003chttps://hexdocs.pm/atomic_writes\u003e.\n\n## License\n\nAtomicWrites is released under the [`Apache License\n2.0`](https://github.com/elliotekj/atomic_writes/blob/main/LICENSE).\n\n## About\n\nThis package was written by [Elliot Jackson](https://elliotekj.com).\n\n- Blog: [https://elliotekj.com](https://elliotekj.com)\n- Email: elliot@elliotekj.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotekj%2Fatomic_writes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felliotekj%2Fatomic_writes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotekj%2Fatomic_writes/lists"}