Open asomers opened 4 years ago
Probably. Do you mean both std::os::windows::fs::FileExt
and std::os::unix::fs::FileExt
or just one of them? Maybe there is some crate with platform-independent abstraction of read_at
?
A pull request is welcome.
Maybe better implement positioned_io::ReadAt
or buffered_offset_reader::OffsetReadMut
(or both)?
Well, I was only thinking about unix. Does anybody even use NBD on Windows?
Does anybody even use NBD on Windows?
I remember trying to use in-memory NBD server running on Windows as a swap-file on Linux.
(Nothing good happened from that attempt although)
I've published read_write_at that intents to be a central place for "read/write with offset" abstraction. I'm going to implement read_write_at::ReadWriteAtMut
for NBD client and maybe integrate it somehow with the server as well.
Maybe there will be a wrapper for FileExt
as well in read_write_at v0.2
.
Would it be possible to implement
FileExt
forNbdClient
? That way consumers could do a singleread_exact_at
instead of aseek
followed byread_exact
.