[package]
name = "fs4"
version = "0.11.1"
rust-version = "1.75.0"
authors = ["Dan Burkert <dan@danburkert.com>", "Al Liu <scygliu1@gmail.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/al8n/fs4-rs"
documentation = "https://docs.rs/fs4"
description = "No libc, pure Rust cross-platform file locks. Original fs2, now supports async and replace libc by rustix."
keywords = ["file", "fs2", "lock", "duplicate", "flock"]
categories = ["filesystem", "external-ffi-bindings", "asynchronous"]
edition = "2021"
[features]
default = ["sync"]
sync = []
async-std = ["dep:async-std"]
tokio = ["dep:tokio"]
smol = ["dep:smol"]
fs-err = ["dep:fs-err", "fs-err/io_safety"]
fs-err-tokio = ["fs-err", "fs-err/tokio"]
[target.'cfg(not(windows))'.dependencies]
rustix = { version = "0.38", features = ["fs"] }
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.52"
features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_IO"]
[dependencies]
async-std = { version = "1", optional = true }
fs-err = { version = "2", optional = true }
smol = { version = "2", optional = true }
tokio = { version = "1", optional = true, default-features = false, features = [
"fs",
] }
[dev-dependencies]
async-std = { version = "1", features = ["attributes"] }
fs-err = { version = "2", features = ["io_safety", "tokio"] }
smol-potat = "1.1"
tempdir = "0.3"
tokio = { version = "1", features = ["full"] }
libc = "0.2"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]