file-exists-macro

Crates.iofile-exists-macro
lib.rsfile-exists-macro
version0.1.0
created_at2025-05-24 08:34:13.880147+00
updated_at2025-05-24 08:34:13.880147+00
descriptionfile exists macro
homepage
repository
max_upload_size
id1687155
size2,991
(86maid)

documentation

README

file-exists-macro

A Rust procedural macro that checks if a file exists at compile time and expands to a boolean (true or false) based on the file's existence.

Example

use file_exists_macro::exists;

const CARGO_EXISTS: bool = exists!("Cargo.toml");

fn main() {
    if CARGO_EXISTS {
        println!("Cargo.toml file exists!");
    } else {
        println!("Cargo.toml file does not exist.");
    }
}
Commit count: 0

cargo fmt