fslock icon indicating copy to clipboard operation
fslock copied to clipboard

File locking for Rust.

Results 7 fslock issues
Sort by recently updated
recently updated
newest added

Due to issues like #6, its hard to retrieve the PID of the process that owns the lockfile if a lock could not be acquired. A method that operates on...

This is not a bug report but a feature request. This library will expand its usage cases if it supports async. Nowadays a lot of users in Rust world are...

Acording to following code https://github.com/koute/stdweb/blob/master/src/webcore/ffi/mod.rs fslock has to implement target_arch = "wasm32", target_os = "unknown" mod for wasm like stdweb does. Otherwise it break the ability of rust to get...

Test `other_process_but_curr_reads` fails. It attempts to read the locked file into a string (in the same process, with `std::fs::read_to_string`) and then spawns another process to make it try to lock...

These traits can be leveraged to access an open LockFile for purposes like inspecting its metadata, or opening it as a File. Importantly, these traits can't easily be misused to...

Functions like `try_lock` and `try_lock_with_pid` are nonsensical to use without looking at their return value. It feels like these and maybe `owns_lock` are candidates for the [must_use](https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute) attribute.

Changes try_lock from a Result to just a Result. This better matches the standard library (see [mutex](https://doc.rust-lang.org/std/sync/struct.Mutex.html#method.try_lock) as an example). I find this to be much more intuitive and inline...