pub fn initialize(config: &Config, dir: Option<&str>) -> Result<(), PathError>Expand description
Initialize the timelog directory supplied and create a .timelogrc config file.
If no directory is supplied default to ~/timelog
§Errors
- Return
PathError::CantCreatePathif cannot create timelog directory - Return
PathError::FileAccessif we are unable to write the configuration. - Return
PathError::InvalidPathif the path is not valid
§Panics
If the canonicalized path cannot be converted to a string.