backend/components/AGitRepository.php
/**
	 * Adds a file or array of files to the git repository
	 * @throws AGitException if there was an error adding the file
	 * @param string|array $file the file or files to add, pass an array to add multiple files
	 */
Adds a file or array of files to the git repository
@throws AGitException if there was an error adding the file
@param string|array $file the file or files to add, pass an array to add multiple files
Adds a file or array of files to the git repository @throws AGitException if there was an error adding the file @param string|array $file the file or files to add pass an array to add multiple files
public function add($file)
	{
		if (is_array($file)) {
			foreach(array_values($file) as $file) {
				$this->add($file);
			}
			return;
		}
		if (!file_exists($file) && !(substr($file,0,1) != "/" && file_exists($this->getPath()."/".$file) )) {
			throw new AGitException("Cannot add ".$file." to the repository because it doesn't exist");
		}
		$this->run("add ".$file);
	}
public function add ( $ file ) { if ( is_array ( $ file ) ) { foreach ( array_values ( $ file ) as $ file ) { $ this -> add ( $ file ) ; } return ; } if ( ! file_exists ( $ file ) && ! ( substr ( $ file , 0 , 1 ) != " / " && file_exists ( $ this -> getPath ( ) . " / " . $ file ) ) ) { throw new AGitException ( " Cannot add  " . $ file . "  to the repository because it doesn't exist " ) ; } $ this -> run ( " add  " . $ file ) ; }
Adds a file or array of files to the git repository
 @throws AGitException if there was an error adding the file
 @param string|array $file the file or files to add, pass an array to add multiple files
Adds a file or array of files to the git repository @throws AGitException if there was an error adding the file @param string|array $file the file or files to add pass an array to add multiple files