pub fn from_path<P: AsRef<Path>>(path: P) -> Result<()>
Expand description

Loads the file at the specified absolute path.

Examples

use std::env;
use std::path::{Path};

let my_path = dirs::home_dir().map(|a| a.join("/.env")).unwrap();
dotenvy::from_path(my_path.as_path());