{"id":21337754,"url":"https://github.com/freeslave/openfile","last_synced_at":"2026-01-03T03:44:15.483Z","repository":{"id":71413289,"uuid":"293402919","full_name":"FreeSlave/openfile","owner":"FreeSlave","description":"Opening std.stdio.File using a set of symbolic constants as a file access mode","archived":false,"fork":false,"pushed_at":"2021-06-09T23:12:02.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T14:45:53.710Z","etag":null,"topics":["d","dlang","file"],"latest_commit_sha":null,"homepage":"","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FreeSlave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_1_0.txt","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":"2020-09-07T02:30:16.000Z","updated_at":"2021-06-09T23:12:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"501c917e-8241-4765-abfe-d54f1c968fc1","html_url":"https://github.com/FreeSlave/openfile","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fopenfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fopenfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fopenfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreeSlave%2Fopenfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FreeSlave","download_url":"https://codeload.github.com/FreeSlave/openfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814893,"owners_count":20352038,"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":["d","dlang","file"],"created_at":"2024-11-22T00:01:24.492Z","updated_at":"2026-01-03T03:44:15.438Z","avatar_url":"https://github.com/FreeSlave.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenFile\n\n[![Build Status](https://github.com/FreeSlave/openfile/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/FreeSlave/openfile/actions/workflows/ci.yml)\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/FreeSlave/openfile?branch=master\u0026svg=true)](https://ci.appveyor.com/project/FreeSlave/openfile)\n[![Coverage Status](https://coveralls.io/repos/FreeSlave/openfile/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/FreeSlave/openfile?branch=master)\n\n**OpenFile** library provides functions for opening *std.stdio.File* using a set of symbolic constants instead of C-style string as a file access mode.\nThis approach allows setting a file access mode which is not possible or non-portable to express via string literals.\nE.g. an exclusive mode which atomically ensures that the file does not exist upon creating.\nAlso someone might just prefer symbolic constants over string literals.\n\n```\nimport openfile;\n\n// Open a file in write mod and ensure that this is a new file with such name \n// avoiding an accidental change of data written by some other process and ensuring that no other file with such name exists at the time of opening.\nFile f = openFile(\"test.txt\", OpenMode.createNew);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreeslave%2Fopenfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreeslave%2Fopenfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreeslave%2Fopenfile/lists"}