Function include_dir::include_dir [] [src]

pub fn include_dir(root: &str) -> IncludeDirBuilder

The entire purpose of this crate.

This function actually creates a builder object which allows you to configure the variable name, and where to save it.

Examples

use std::env;
use std::path::Path;
use include_dir::include_dir;

let outdir = env::var("OUT_DIR").unwrap();
let dest_path = Path::new(&outdir).join("assets.rs");

include_dir("src")
  .as_variable("SRC")
  .to_file(dest_path)
  .unwrap();