{"id":16714170,"url":"https://github.com/flier/rust-cfile","last_synced_at":"2025-04-10T06:10:29.033Z","repository":{"id":57546656,"uuid":"57379412","full_name":"flier/rust-cfile","owner":"flier","description":"Rust bindings to C FILE stream","archived":false,"fork":false,"pushed_at":"2019-11-07T08:00:29.000Z","size":1269,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T07:14:23.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/flier.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}},"created_at":"2016-04-29T11:27:09.000Z","updated_at":"2024-12-04T21:46:47.000Z","dependencies_parsed_at":"2022-09-26T18:30:34.099Z","dependency_job_id":null,"html_url":"https://github.com/flier/rust-cfile","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-cfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-cfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-cfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-cfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flier","download_url":"https://codeload.github.com/flier/rust-cfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166925,"owners_count":21058481,"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-10-12T20:49:43.643Z","updated_at":"2025-04-10T06:10:29.014Z","avatar_url":"https://github.com/flier.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-cfile [![crates.io](http://meritbadge.herokuapp.com/cfile)](https://crates.io/crates/cfile) [![docs](https://docs.rs/fasthash/badge.svg)](https://docs.rs/crate/cfile/) [![travis](https://travis-ci.org/flier/rust-cfile.svg?branch=master)](https://travis-ci.org/flier/rust-cfile) [![Build status](https://ci.appveyor.com/api/projects/status/0lsnxvj7bqeorslw?svg=true)](https://ci.appveyor.com/project/flier/rust-cfile) [![dependency status](https://deps.rs/repo/github/flier/rust-cfile/status.svg)](https://deps.rs/repo/github/flier/rust-cfile)\n\nRust bindings to C *FILE stream\n\n## Examples\n\n```rust\nuse std::io::prelude::*;\nuse std::io::{BufReader, SeekFrom};\n\nuse cfile;\n\n// open a tempfile\nlet mut f = cfile::tmpfile().unwrap();\n\n// write something to the stream\nassert_eq!(f.write(b\"test\").unwrap(), 4);\n\n// force to flush the stream\nf.flush().unwrap();\n\n// seek to the beginning of stream\nassert_eq!(f.seek(SeekFrom::Start(0)).unwrap(), 0);\n\nlet mut r = BufReader::new(f);\nlet mut s = String::new();\n\n// read back the text\nassert_eq!(r.read_line(\u0026mut s).unwrap(), 4);\nassert_eq!(s, \"test\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflier%2Frust-cfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflier%2Frust-cfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflier%2Frust-cfile/lists"}