src/Checksum_Base_Command.php
protected function get_files( $path ) {
		$filtered_files = array();
		try {
			$files = new RecursiveIteratorIterator(
				new RecursiveDirectoryIterator(
					$path,
					RecursiveDirectoryIterator::SKIP_DOTS
				),
				RecursiveIteratorIterator::CHILD_FIRST
			);
			foreach ( $files as $file_info ) {
				$pathname = self::normalize_directory_separators( substr( $file_info->getPathname(), strlen( $path ) ) );
				if ( $file_info->isFile() && $this->filter_file( $pathname ) ) {
					$filtered_files[] = $pathname;
				}
			}
		} catch ( Exception $e ) {
			WP_CLI::error( $e->getMessage() );
		}

		return $filtered_files;
	}
protected function get_files( $path ) {
		$filtered_files = array();
		try {
			$files = new RecursiveIteratorIterator(
				new RecursiveDirectoryIterator(
					$path,
					RecursiveDirectoryIterator::SKIP_DOTS
				),
				RecursiveIteratorIterator::CHILD_FIRST
			);
			foreach ( $files as $file_info ) {
				$pathname = self::normalize_directory_separators( substr( $file_info->getPathname(), strlen( $path ) ) );
				if ( $file_info->isFile() && $this->filter_file( $pathname ) ) {
					$filtered_files[] = $pathname;
				}
			}
		} catch ( Exception $e ) {
			WP_CLI::error( $e->getMessage() );
		}

		return $filtered_files;
	}
protected function get_files ( $ path ) { $ filtered_files = array ( ) ; try { $ files = new RecursiveIteratorIterator ( new RecursiveDirectoryIterator ( $ path , RecursiveDirectoryIterator :: SKIP_DOTS ) , RecursiveIteratorIterator :: CHILD_FIRST ) ; foreach ( $ files as $ file_info ) { $ pathname = self :: normalize_directory_separators ( substr ( $ file_info -> getPathname ( ) , strlen ( $ path ) ) ) ; if ( $ file_info -> isFile ( ) && $ this -> filter_file ( $ pathname ) ) { $ filtered_files [ ] = $ pathname ; } } } catch ( Exception $ e ) { WP_CLI :: error ( $ e -> getMessage ( ) ) ; } return $ filtered_files ; }
Recursively get the list of files for a given path.

@param string $path Root path to start the recursive traversal in.

@return array<string>
Recursively get the list of files for a given path .