public function getUniqueFilename()
	{
		$pathInfo = pathinfo($this->filename);
		$filename = $pathInfo['filename'];
		$extension = $pathInfo['extension'];
		$increment = 1;
		while($this->fileExists($filename . "_" . $increment, $extension))
		{
			$increment++;
		}
		$this->filename = $filename . "_" . $increment . '.' . $extension;

		return $this;
	}
public function getUniqueFilename()
	{
		$pathInfo = pathinfo($this->filename);
		$filename = $pathInfo['filename'];
		$extension = $pathInfo['extension'];
		$increment = 1;
		while($this->fileExists($filename . "_" . $increment, $extension))
		{
			$increment++;
		}
		$this->filename = $filename . "_" . $increment . '.' . $extension;

		return $this;
	}
public function getUniqueFilename ( ) { $ pathInfo = pathinfo ( $ this -> filename ) ; $ filename = $ pathInfo [ 'filename' ] ; $ extension = $ pathInfo [ 'extension' ] ; $ increment = 1 ; while ( $ this -> fileExists ( $ filename . "_" . $ increment , $ extension ) ) { $ increment ++ ; } $ this -> filename = $ filename . "_" . $ increment . '.' . $ extension ; return $ this ; }
Returns a unique file name for the upload by appending a sequential number. Checks to make sure file doesn't exist before returning a name.
@return String
Returns a unique file name for the upload by appending a sequential number . Checks to make sure file doesn t exist before returning a name .