about summary refs log tree commit diff
path: root/library/std/src/sys/fs/hermit.rs
AgeCommit message (Collapse)AuthorLines
2025-06-05Optimize `Seek::stream_len` impl for `File`Tobias Bucher-0/+4
It uses the file metadata on Unix with a fallback for files incorrectly reported as zero-sized. It uses `GetFileSizeEx` on Windows. This reduces the number of syscalls needed for determining the file size of an open file from 3 to 1.
2025-05-03Rollup merge of #139343 - cberner:filelock_wouldblock, r=workingjubileeMatthias Krüger-5/+6
Change signature of File::try_lock and File::try_lock_shared These methods now return Result<(), TryLockError> instead of Result<bool, Error> to make their use less errorprone These methods are unstable under the "file_lock" feature. The related tracking issue is https://github.com/rust-lang/rust/pull/130999 and this PR changes the signatures as discussed by libs-api: https://github.com/rust-lang/rust/issues/130994#issuecomment-2770838848
2025-05-01Change signature of File::try_lock and File::try_lock_sharedChristopher Berner-5/+6
These methods now return Result<(), TryLockError> instead of Result<bool, Error> to make their use less errorprone
2025-04-04Move fd into sysThalia Archibald-1/+1
2025-03-17Implement read_buf for HermitThalia Archibald-1/+1
2025-03-09Support File::seek for HermitThalia Archibald-3/+3
2025-03-08Move fs into sysThalia Archibald-0/+602