#file #lock #duplicate #flock #fs2

fs4

No libc, pure Rust cross-platform file locks. Original fs2, now supports async and replace libc by rustix.

12 releases

0.6.6 Jul 3, 2023
0.6.5 May 31, 2023
0.6.3 Jan 31, 2023
0.6.2 Jul 4, 2022
0.5.4 Dec 31, 2021

#43 in Filesystem

Download history 54373/week @ 2023-06-07 42796/week @ 2023-06-14 44934/week @ 2023-06-21 36833/week @ 2023-06-28 44388/week @ 2023-07-05 47729/week @ 2023-07-12 46566/week @ 2023-07-19 53090/week @ 2023-07-26 49005/week @ 2023-08-02 49495/week @ 2023-08-09 59493/week @ 2023-08-16 117634/week @ 2023-08-23 98536/week @ 2023-08-30 129795/week @ 2023-09-06 122688/week @ 2023-09-13 108179/week @ 2023-09-20

485,163 downloads per month
Used in 48 crates (17 directly)

MIT/Apache

78KB
1.5K SLoC

fs4

Extended utilities for working with files and filesystems in Rust.

This is a fork of the fs2-rs crate, the aim for this fork is to support async and replace libc by rustix.

github Build codecov

docs.rs crates.io crates.io

license-apache license-mit

Installation

  • std

    [dependencies]
    fs4 = { version = "0.6", features = ["sync"] }
    
  • tokio runtime

    [dependencies]
    fs4 = { version = "0.6", features = ["tokio-async"] }
    
  • async-std runtime

    [dependencies]
    fs4 = { version = "0.6", features = ["std-async"] }
    
  • smol runtime

    [dependencies]
    fs4 = { version = "0.6", features = ["smol-async"] }
    

Features

License

fs4 is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright (c) 2021 Al Liu.

Copyright (c) 2015 Dan Burkert.

Dependencies

~0–15MB
~159K SLoC