Function cargo_readme::project::get_root[][src]

pub fn get_root(given_root: Option<&str>) -> Result<PathBuf, String>

Get the project root from given path or defaults to current directory

The given path is appended to the current directory if is a relative path, otherwise it is used as is. If no path is given, the current directory is used. A Cargo.toml file must be present is the root directory.