MCPcopy Index your code
hub / github.com/danburkert/fs2-rs

github.com/danburkert/fs2-rs @0.4.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.4.3 ↗ · + Follow
69 symbols 176 edges 3 files 11 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

fs2

Extended utilities for working with files and filesystems in Rust. fs2 requires Rust stable 1.8 or greater.

Build Status Windows Build status Documentation Crate

Features

  • [x] file descriptor duplication.
  • [x] file locks.
  • [x] file (pre)allocation.
  • [x] file allocation information.
  • [x] filesystem space usage information.

Platforms

fs2 should work on any platform supported by libc.

fs2 is continuously tested on: * x86_64-unknown-linux-gnu (Linux) * i686-unknown-linux-gnu * x86_64-apple-darwin (OSX) * i686-apple-darwin * x86_64-pc-windows-msvc (Windows) * i686-pc-windows-msvc * x86_64-pc-windows-gnu * i686-pc-windows-gnu

Benchmarks

Simple benchmarks are provided for the methods provided. Many of these benchmarks use files in a temporary directory. On many modern Linux distros the default temporary directory, /tmp, is mounted on a tempfs filesystem, which will have different performance characteristics than a disk-backed filesystem. The temporary directory is configurable at runtime through the environment (see env::temp_dir).

License

fs2 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) 2015 Dan Burkert.

Extension points exported contracts — how you extend this code

FileExt (Interface)
Extension trait for `std::fs::File` which provides allocation, duplication and locking methods. ## Notes on File Locks [1 …
src/lib.rs

Core symbols most depended-on inside this repo

lock_shared
called by 14
src/lib.rs
lock_exclusive
called by 12
src/lib.rs
unlock
called by 10
src/lib.rs
duplicate
called by 8
src/lib.rs
flock
called by 5
src/unix.rs
statvfs
called by 4
src/lib.rs
lock_file
called by 4
src/windows.rs
allocate
called by 3
src/lib.rs

Shape

Function 55
Method 12
Class 1
Interface 1

Languages

Rust100%

Modules by API surface

src/lib.rs35 symbols
src/windows.rs18 symbols
src/unix.rs16 symbols

For agents

$ claude mcp add fs2-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page