devicons 0.6.12

A Rust library that provides filetype glyphs (icons) for a wide range of common file formats.
Documentation
1
2
3
4
5
6
7
8
use devicons::FileIcon;

fn main() {
    let icon = FileIcon::from("Cargo.toml");

    println!("Icon: {}", icon.icon);
    println!("Color: {}", icon.color);
}