diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2016-08-16 01:11:33 +0200 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2016-10-09 10:48:07 +0200 |
| commit | b3f2644b66647d47338051d783cae8e661312472 (patch) | |
| tree | 681ee7fee5cea595cfadbcaf44e7219b61c31338 /src/libstd/sys/unix/ext/mod.rs | |
| parent | b98cc352cbb428f3c9a0e608bc57a83109a26a57 (diff) | |
| download | rust-b3f2644b66647d47338051d783cae8e661312472.tar.gz rust-b3f2644b66647d47338051d783cae8e661312472.zip | |
Implement reading and writing atomically at certain offsets
These functions allow to read from and write to a file in one atomic
action from multiple threads, avoiding the race between the seek and the
read.
The functions are named `{read,write}_at` on non-Windows (which don't
change the file cursor), and `seek_{read,write}` on Windows (which
change the file cursor).
Diffstat (limited to 'src/libstd/sys/unix/ext/mod.rs')
| -rw-r--r-- | src/libstd/sys/unix/ext/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/ext/mod.rs b/src/libstd/sys/unix/ext/mod.rs index 1be3d75d866..b2483f4e209 100644 --- a/src/libstd/sys/unix/ext/mod.rs +++ b/src/libstd/sys/unix/ext/mod.rs @@ -50,6 +50,8 @@ pub mod prelude { pub use super::fs::{PermissionsExt, OpenOptionsExt, MetadataExt, FileTypeExt}; #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use super::fs::DirEntryExt; + #[doc(no_inline)] #[unstable(feature = "file_offset", issue = "35918")] + pub use super::fs::FileExt; #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")] pub use super::thread::JoinHandleExt; #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")] |
