backend/components/AGitRepository.php
/**
	 * Removes a file or array of files from the git repository
	 * @throws AGitException if there was an error removing the file
	 * @param string|array $file the file or files to remove, pass an array to remove multiple files
	 * @param boolean $force whether to force removal of the file, even if there are staged changes
	 */
Removes a file or array of files from the git repository
@throws AGitException if there was an error removing the file
@param string|array $file the file or files to remove, pass an array to remove multiple files
@param boolean $force whether to force removal of the file, even if there are staged changes
Removes a file or array of files from the git repository @throws AGitException if there was an error removing the file @param string|array $file the file or files to remove pass an array to remove multiple files @param boolean $force whether to force removal of the file even if there are staged changes
public function rm($file, $force = false)
	{
		if (is_array($file)) {
			foreach(array_values($file) as $file) {
				$this->rm($file);
			}
			return;
		}
		if (!file_exists($file) && !(substr($file,0,1) != "/" && file_exists($this->getPath()."/".$file) )) {
			throw new AGitException("Cannot remove ".$file." from the repository because it doesn't exist");
		}
		if ($force) {
			$this->run("rm -f ".$file);
		}
		else {
			$this->run("rm ".$file);
		}
	}
public function rm ( $ file , $ force = false ) { if ( is_array ( $ file ) ) { foreach ( array_values ( $ file ) as $ file ) { $ this -> rm ( $ file ) ; } return ; } if ( ! file_exists ( $ file ) && ! ( substr ( $ file , 0 , 1 ) != " / " && file_exists ( $ this -> getPath ( ) . " / " . $ file ) ) ) { throw new AGitException ( " Cannot remove  " . $ file . "  from the repository because it doesn't exist " ) ; } if ( $ force ) { $ this -> run ( " rm -f  " . $ file ) ; } else { $ this -> run ( " rm  " . $ file ) ; } }
Removes a file or array of files from the git repository
 @throws AGitException if there was an error removing the file
 @param string|array $file the file or files to remove, pass an array to remove multiple files
 @param boolean $force whether to force removal of the file, even if there are staged changes
Removes a file or array of files from the git repository @throws AGitException if there was an error removing the file @param string|array $file the file or files to remove pass an array to remove multiple files @param boolean $force whether to force removal of the file even if there are staged changes