Files
Jeffrey Dallatezza c43439d05a Add some tests and metadata to LockedFile (#4834)
# Description of Changes

1. This adds some basic tests of `LockedFile` (which would generally
have also passed before these changes).
2. `LockedFile` can now have contents, which are added to the errors if
we can't aquire the lock. The default metadata has the pid and a
timestamp.

I now see that there is a separate `Lockfile` that doesn't clean up
locks on a crash, so that should probably also be cleaned up (but in a
separate PR).


# Expected complexity level and risk

1.

# Testing

This has unit tests.
2026-04-23 21:11:37 +00:00

25 lines
560 B
TOML

[package]
name = "spacetimedb-fs-utils"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license-file = "LICENSE"
description = "Assorted utilities for filesystem operations used in SpacetimeDB"
[dependencies]
anyhow.workspace = true
log.workspace = true
chrono = { workspace = true, features = ["alloc", "std"] }
fs2.workspace = true
hex.workspace = true
rand.workspace = true
thiserror.workspace = true
tokio.workspace = true
zstd-framed.workspace = true
[dev-dependencies]
tempdir.workspace = true
[lints]
workspace = true