How I want to simplify async filesystem APIs... 1/13
read_at/write_at are Linux only though. Being able to seek asynchronously is essential for anything requiring random-access reads/writes cross-platform. This is common in for example databases. Calling it "vestigial" doesn't sound quite right. https://doc.rust-lang.org/std/fs/struct.File.html?search=read_at …
-
-
They're not Linux-only - read_at/write_at exist on all Unix systems, including macOS/iOS/Android/etc. And Windows has similar functions called seek_read/seek_write: https://doc.rust-lang.org/std/os/windows/fs/trait.FileExt.html#tymethod.seek_read … https://doc.rust-lang.org/std/os/windows/fs/trait.FileExt.html#tymethod.seek_write …
-
I feel the concept of file cursors and seeking is an old C-ism that requires locking on the OS level and prohibits parallelism. It makes files stateful and is why File implementations in async-std/tokio are so complicated.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.