protected function purge($path)
	{
		$directory = pathinfo($path, PATHINFO_DIRNAME);
		while ($directory != $this->uploadPath)
		{
			if (count(glob($directory .'/*')))
			{
				break;
			}

			rmdir($directory);
			$directory = dirname($directory);
		}
	}
protected function purge($path)
	{
		$directory = pathinfo($path, PATHINFO_DIRNAME);
		while ($directory != $this->uploadPath)
		{
			if (count(glob($directory .'/*')))
			{
				break;
			}

			rmdir($directory);
			$directory = dirname($directory);
		}
	}
protected function purge ( $ path ) { $ directory = pathinfo ( $ path , PATHINFO_DIRNAME ) ; while ( $ directory != $ this -> uploadPath ) { if ( count ( glob ( $ directory . '/*' ) ) ) { break ; } rmdir ( $ directory ) ; $ directory = dirname ( $ directory ) ; } }
Remove all empty directories starting from the leaf node and moving all the way up to the upload path.

@param string $path
Remove all empty directories starting from the leaf node and moving all the way up to the upload path .