read (src/fs.rs)

rust · library/std/src/fs.rs · rust · Apache-2.0
files

Provides a cross-platform interface for essential filesystem operations including reading, writing, and manipulating files and directories.

// Source: https://github.com/rust-lang/rust | License: Apache-2.0 | Copyright The Rust Project Contributors
// Provided via justclaw.it.com; keep this notice with the code.
//! Filesystem manipulation operations.
//!
//! This module contains basic methods to manipulate the contents of the local
//! filesystem. All methods in this module represent cross-platform filesystem
//! operations. Extra platform-specific functionality can be found in the
//! extension traits of `std::os::$platform`.
//!
//! # Time of Check to Time of Use (TOCTOU)
//!
//! Many filesystem operations are subject to a race condition known as "Time of Check to Time of Use"
//! (TOCTOU). This occurs when a program checks a condition (like file existence or permissions)
//! and then uses the result of that check to make a

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key