[][src]Function kankyo::unload_from_path

pub fn unload_from_path<P: AsRef<Path>>(path: P) -> IoResult<()>

Unloads from the read content of the given path.

The path should contain content that of a .env file.

If you need to unload a given slice of keys, prefer utils::unload. If you need to unload from a reader (e.g. an in-memory buffer), prefer unload_from_reader. If you need to just unload from a .env file, prefer unload.

Examples

Unload from a file at the path ./.prod.env:

try!(kankyo::unload_from_path("./.prod.env"));

println!("Successfully unloaded from `./.prod.env`");