{"id":19436401,"url":"https://github.com/beached/libtemp_file","last_synced_at":"2025-02-25T06:46:45.627Z","repository":{"id":149955356,"uuid":"71011809","full_name":"beached/libtemp_file","owner":"beached","description":"A simple interface to create and ensure removal of temp files.","archived":false,"fork":false,"pushed_at":"2022-05-28T21:18:26.000Z","size":53,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-07T21:12:32.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/beached.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":"2016-10-15T20:31:52.000Z","updated_at":"2022-05-03T04:32:42.000Z","dependencies_parsed_at":"2023-05-05T06:20:33.135Z","dependency_job_id":null,"html_url":"https://github.com/beached/libtemp_file","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Flibtemp_file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Flibtemp_file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Flibtemp_file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Flibtemp_file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beached","download_url":"https://codeload.github.com/beached/libtemp_file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240619430,"owners_count":19830204,"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-10T15:10:58.895Z","updated_at":"2025-02-25T06:46:45.601Z","avatar_url":"https://github.com/beached.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libtemp_file\nA simple interface to create temp files and ensure their removal at program exit.\n\nThe class has the same semantics as a shared_ptr and will delete the file when the last copy is destructed.\nThe class holds a shared_ptr containing boost::filesystem::path and the methods of path can be access via operator-\u003e( ) or (*path).method\n```c++\n{\n\tauto tmp = daw::unique_temp_file{ };\n\tauto out_file = tmp.create_secure_stream( );\n\tif( out_file ) {\n\t\tout_file \u003c\u003c \"Will delete\" \u003c\u003c std::endl;\n\t}\n\tout_file.close( );\n}\n```\nThe create_secure_stream( ) method will create a new file with exclusive access and with read and write access.  The permissions will be 00600 so that the current user is the only id with access.\nTo prevent the file from being deleted, you can call disconnect( ) and it will return the path object and no longer delete the file on destruction\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeached%2Flibtemp_file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeached%2Flibtemp_file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeached%2Flibtemp_file/lists"}