classes/scanner.php
private function recursiveScan($startFolder) {
		if (is_file($startFolder)) {
			$this->files[] = $startFolder;
			return;
		}
		$contents = scandir($startFolder);
		foreach ($contents as $content) {
			if (strpos($content, '.') === 0) {
				continue;
			}

			$path = $startFolder.DIRECTORY_SEPARATOR.$content;
			if (is_dir($path)) {
				$this->recursiveScan($path);
			} else {
				$fileExtension = pathinfo($content, PATHINFO_EXTENSION);
				if (strlen($fileExtension) == 0 || !in_array($fileExtension, $this->getFileExtensions())) {
					continue;
				}
				$this->files[] = $path;
			}
		}
	}
private function recursiveScan($startFolder) {
		if (is_file($startFolder)) {
			$this->files[] = $startFolder;
			return;
		}
		$contents = scandir($startFolder);
		foreach ($contents as $content) {
			if (strpos($content, '.') === 0) {
				continue;
			}

			$path = $startFolder.DIRECTORY_SEPARATOR.$content;
			if (is_dir($path)) {
				$this->recursiveScan($path);
			} else {
				$fileExtension = pathinfo($content, PATHINFO_EXTENSION);
				if (strlen($fileExtension) == 0 || !in_array($fileExtension, $this->getFileExtensions())) {
					continue;
				}
				$this->files[] = $path;
			}
		}
	}
private function recursiveScan ( $ startFolder ) { if ( is_file ( $ startFolder ) ) { $ this -> files [ ] = $ startFolder ; return ; } $ contents = scandir ( $ startFolder ) ; foreach ( $ contents as $ content ) { if ( strpos ( $ content , '.' ) === 0 ) { continue ; } $ path = $ startFolder . DIRECTORY_SEPARATOR . $ content ; if ( is_dir ( $ path ) ) { $ this -> recursiveScan ( $ path ) ; } else { $ fileExtension = pathinfo ( $ content , PATHINFO_EXTENSION ) ; if ( strlen ( $ fileExtension ) == 0 || ! in_array ( $ fileExtension , $ this -> getFileExtensions ( ) ) ) { continue ; } $ this -> files [ ] = $ path ; } } }
Perform a recursive scan of the given path to return files only.

@access	private
@param	string	Starting Folder
@return	void
Perform a recursive scan of the given path to return files only .