public/wordpress/wp-content/plugins/backupbuddy/destinations/s33/init.php
/* listFiles()
	 *
	 * Returns array of files or string error message.
	 *
	 */
listFiles()
Returns array of files or string error message.
listFiles () Returns array of files or string error message .
public static function listFiles( $settings, $prefix = '', $marker = '' ) {
		$settings = self::_init( $settings );
		$options = array(
			'Bucket' => $settings['bucket'],
			'Prefix' => $prefix
		);
		if ( isset( $settings['max_filelist_keys'] ) ) {
			$options['MaxKeys'] = $settings['max_filelist_keys'];
		}
		if ( '' !== $marker ) {
			$options['Marker'] = $marker;
		}
		try {
			$response = self::$_client->listObjects( $options ); 
		} Catch( Exception $e ) {
			$error = 'Error #838393: Unable to list files. Details: `' . $e->getMessage() . '`. Bucket: `' . $settings['bucket'] . '`. Prefix: `' . $prefix . '`.';
			if ( stristr( $error, 'Please send all future requests to this endpoint' ) ) {
				$error .= ' TO FIX THIS: Navigate to the settings for this destination and change the `Bucket region` to the correct location.';
			}
			self::_error( $error );
			return $error;
		}
		return (array)$response['Contents'];
	}
public static function listFiles ( $ settings , $ prefix = '' , $ marker = '' ) { $ settings = self :: _init ( $ settings ) ; $ options = array ( 'Bucket' => $ settings [ 'bucket' ] , 'Prefix' => $ prefix ) ; if ( isset ( $ settings [ 'max_filelist_keys' ] ) ) { $ options [ 'MaxKeys' ] = $ settings [ 'max_filelist_keys' ] ; } if ( '' !== $ marker ) { $ options [ 'Marker' ] = $ marker ; } try { $ response = self :: $ _client -> listObjects ( $ options ) ; } Catch ( Exception $ e ) { $ error = 'Error #838393: Unable to list files. Details: `' . $ e -> getMessage ( ) . '`. Bucket: `' . $ settings [ 'bucket' ] . '`. Prefix: `' . $ prefix . '`.' ; if ( stristr ( $ error , 'Please send all future requests to this endpoint' ) ) { $ error .= ' TO FIX THIS: Navigate to the settings for this destination and change the `Bucket region` to the correct location.' ; } self :: _error ( $ error ) ; return $ error ; } return ( array ) $ response [ 'Contents' ] ; }
listFiles()
 Returns array of files or string error message.
listFiles () Returns array of files or string error message .
/*
		echo '<br>Prefix: ' . $prefix . '<br>';
		echo 'listfilessettings:<pre>';
		print_r( $settings );
		echo '</pre>';
		*/ // list all the files in the subscriber account. /*
		echo ' listfilesResponse:<pre>';
		print_r( $response );
		echo '</pre>';
		*/