Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing file operations #510

Open
6 of 13 tasks
Tracked by #388
talex5 opened this issue May 8, 2023 · 3 comments
Open
6 of 13 tasks
Tracked by #388

Add missing file operations #510

talex5 opened this issue May 8, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@talex5
Copy link
Collaborator

talex5 commented May 8, 2023

The FS API is currently missing lots of functions that are in OCaml's Unix:

Also, would be good to provide helpers for:

@talex5 talex5 added the enhancement New feature or request label May 8, 2023
@talex5 talex5 mentioned this issue May 8, 2023
25 tasks
@balat balat added this to the Eio 1.0 milestone May 12, 2023
@adatario
Copy link
Contributor

Similarily it might be nice to expose something that would allow the creation of temporary files without going trough env#fs.

Maybe by exposing a temp_dir path in the Stdenv that uses Unix.get_temp_dir_name ?

@yawaramin
Copy link

Or using Filename.get_temp_dir_name to avoid Unix dependency.

@avsm
Copy link
Contributor

avsm commented Jul 12, 2023

The only one of this list that I'm a little wary of adding to Eio without some thought is map_file. It's almost never the right answer to memory map a large amount of data, since you lose control of when the process blocks in the memory subsystem. I wonder if we can build something with a similar interface using OCaml's custom array indexing operators, but that goes via uring/pread calls instead of mmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants