/// PARAMS: none. closes the currently opened
/// repository, by running an 'rm' command on the
/// symbolic link. If no repository is opened,
/// it prints a message and returns.
none. closes the currently opened
repository, by running an 'rm' command on the
symbolic link. If no repository is opened,
it prints a message and returns.
none . closes the currently opened repository by running an ' rm ' command on the symbolic link . If no repository is opened it prints a message and returns .
pub fn close_repo(&mut self) -> Result<()> {
        if utils::dir_exists(&self.open_link) {
            utils::remove_file(&self.open_link)?;
            self.open_link = "".to_string();
            self.write_data()?;
            println!("successfully closed the opened repository.")
        } else {
            println!("there is no repository currently open.");
        }
        Ok(())
    }
pub fn close_repo ( & mut self ) -> Result < ( ) > { if utils :: dir_exists ( & self . open_link ) { utils :: remove_file ( & self . open_link ) ? ; self . open_link = " " . to_string ( ) ; self . write_data ( ) ? ; println ! ( " " ) } else { println ! ( " " ) ; } Ok ( ( ) ) }
PARAMS: none.
PARAMS : none .
&mut self