Get the handle of a file
Open
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Currently all commands are one-offs, e.g. File.write_lines "file.txt" ["Hello"; "World"]. It would be nice if you could get a handle to a file, similar to rust's fs(https://doc.rust-lang.org/std/fs/struct.File.html#examples)
use std::fs::File;
use std::io::prelude::*;
fn main() -> std::io::Result<()> {
let mut file = File::open("foo.txt")?;
let mut contents = String::new();
file.read_to_string(&mut contents)?;
assert_eq!(contents, "Hello, world!");
Ok(())
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin at the existing File.write_lines command and compare the requested behavior with the linked Rust fs::File example. Define the file-handle API around opening and reading a file, and consider the issue complete when callers can retain a handle instead of using only one-off commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100