pub fn from_file<P: AsRef<Path>>(file: P) -> BuilderResult {
        debugln!("Creating clog with \n\tfile: {:?}", file.as_ref());
        // Determine if the cfg_file was relative or not
        let cfg_file = if file.as_ref().is_relative() {
            debugln!("file is relative");
            let cwd = match env::current_dir() {
                Ok(d) => d,
                Err(..) => return Err(Error::CurrentDirErr),
            };
            Path::new(&cwd).join(file.as_ref())
        } else {
            debugln!("file is absolute");
            file.as_ref().to_path_buf()
        };

        // We assume whatever dir the .clog.toml file is also contains the git metadata
        let mut dir = cfg_file.clone();
        dir.pop();
        Clog::with_dir_and_file(dir, cfg_file)
    }
/// Creates a `Clog` struct a custom named TOML configuration file. Sets the parent directory
/// of the configuration file to the working tree and sibling `.git` directory as the git
/// directory.
///
/// **NOTE:** If you specify a `.git` folder the parent will be used as the working tree, and
/// vice versa.
///
/// # Example
///
/// ```no_run
/// # use clog::Clog;
/// let clog = Clog::from_file("/myproject/clog_conf.toml").unwrap_or_else(|e| {
///     e.exit();
/// });
/// ```
Creates a `Clog` struct a custom named TOML configuration file. Sets the parent directory
of the configuration file to the working tree and sibling `.git` directory as the git
directory.

If you specify a `.git` folder the parent will be used as the working tree, and
vice versa.
Creates a ` Clog ` struct a custom named TOML configuration file . Sets the parent directory of the configuration file to the working tree and sibling ` . git ` directory as the git directory . If you specify a ` . git ` folder the parent will be used as the working tree and vice versa .
pub fn from_file<P: AsRef<Path>>(file: P) -> BuilderResult {
        debugln!("Creating clog with \n\tfile: {:?}", file.as_ref());
        // Determine if the cfg_file was relative or not
        let cfg_file = if file.as_ref().is_relative() {
            debugln!("file is relative");
            let cwd = match env::current_dir() {
                Ok(d) => d,
                Err(..) => return Err(Error::CurrentDirErr),
            };
            Path::new(&cwd).join(file.as_ref())
        } else {
            debugln!("file is absolute");
            file.as_ref().to_path_buf()
        };
        // We assume whatever dir the .clog.toml file is also contains the git metadata
        let mut dir = cfg_file.clone();
        dir.pop();
        Clog::with_dir_and_file(dir, cfg_file)
    }
pub fn from_file < P : AsRef < Path > > ( file : P ) -> BuilderResult { debugln ! ( " \n \t " file as_ref ( ) ) ; // Determine if the cfg_file was relative or not let cfg_file = if file . as_ref ( ) . is_relative ( ) { debugln ! ( " " ) ; let cwd = match env :: current_dir ( ) { Ok ( d ) => d , Err ( .. ) => return Err ( Error :: CurrentDirErr ) , } ; Path :: new ( & cwd ) . join ( file . as_ref ( ) ) } else { debugln ! ( " " ) ; file . as_ref ( ) . to_path_buf ( ) } ; // We assume whatever dir the .clog.toml file is also contains the git metadata let mut dir = cfg_file . clone ( ) ; dir . pop ( ) ; Clog :: with_dir_and_file ( dir , cfg_file ) }
Creates a `Clog` struct a custom named TOML configuration file.
Creates a ` Clog ` struct a custom named TOML configuration file .
file
P
file
P
example
None
use clog::clog;
let clog = Clog::from_file("/myproject/clog_conf.toml").unwrap_or_else(|e| {
e.exit();
});
```
let clog = Clog :: from_file ( " / myproject / clog_conf . toml " ) . unwrap_or_else ( |e| { e . exit () ; } ) ; ` ` `