Files
rust/library/std/src/sys
Matthias Krüger 10018d8e10 Rollup merge of #137165 - thaliaarchi:file-tell, r=ChrisDenton
Use `tell` for `<File as Seek>::stream_position`

Some platforms have a more efficient way to get the current offset of the file than by seeking. For example, Wasi has `fd_tell` and SOLID has `SOLID_FS_Ftell`. Implement `<File as Seek>::stream_position()` in terms of those.

I do not use any APIs that were not already used in `std`. Although, the `libc` crate has [`ftell`](https://docs.rs/libc/latest/libc/fn.ftell.html), [`ftello`](https://docs.rs/libc/latest/libc/fn.ftello.html), and [`ftello64`](https://docs.rs/libc/latest/libc/fn.ftello64.html), I do not know platform coverage. It appears that Windows has no `tell`-like API.

I have checked that it builds on each relevant platform.
2025-02-17 17:06:10 +01:00
..
2025-02-07 16:54:07 +01:00
2024-11-12 15:08:41 -06:00
2025-01-16 10:19:22 +05:30
2025-02-09 17:11:13 +00:00
2025-02-09 17:11:13 +00:00
2025-02-09 17:11:13 +00:00
2025-02-14 01:23:16 +03:00
2024-07-08 09:19:25 -05:00
2025-02-07 16:54:07 +01:00