# Examples for `devicons` This folder contains example minimal programs that demonstrate how to use the `devicons` crate. ## How to Run the Examples To run any example, use the following command from the root of your project: ```bash cargo run --example ``` Replace `` with the name of the example you want to run (without the `.rs` extension). For example: ```bash cargo run --example dark_theme ``` ## Examples ### 1. `dark_theme.rs` This example demonstrates how to use the `File` struct and retrieve the icon for a file using the dark theme. **Running the example:** ```bash cargo run --example dark_theme ``` **What it does:** - Creates a `File` instance for a file named `example.txt`. - Retrieves the file icon using the dark theme. - Prints the the icon character, and the associated color. ### 2. `light_theme.rs` This example shows how to retrieve the icon for a directory using the light theme. **Running the example:** ```bash cargo run --example light_theme ``` **What it does:** - Creates a `File` instance for a directory named `my_folder/`. - Retrieves the directory icon using the light theme. - Prints the the icon character, and the associated color. ### 3. `default.rs` This example demonstrates how to retrieve the icon for a file with using the default theme (which defaults to the dark theme). **Running the example:** ```bash cargo run --example default ``` **What it does:** - Creates a `File` instance for a directory named `my_folder/`. - Retrieves the directory icon using the default theme. - Prints the the icon character, and the associated color.