public/wordpress/wp-content/plugins/backupbuddy/destinations/live/init.php
/* listFiles()
	 *
	 * Get list of files with optional prefix. Returns stashAPI response.
	 *
	 */
listFiles()
Get list of files with optional prefix. Returns stashAPI response.
listFiles () Get list of files with optional prefix . Returns stashAPI response .
public static function listFiles( $settings, $prefix = '', $marker = '' ) {
		$settings = self::_init( $settings );
		$response = self::_get_live_action_response( $settings );
		if ( false === $response ) {
			return false;
		}
		$settings['stash_mode'] = '1'; 
		$settings['bucket'] = $response['bucket'];
		$settings['credentials'] = $response['credentials'];
		$prefix = $response['prefix'] . '/' . $prefix;
		if ( '' != $marker ) {
			$marker = $prefix . $marker;
		}
		$files = call_user_func_array( array( 'pb_backupbuddy_destination_s3' . $settings['destination_version'], 'listFiles' ), array( $settings, $prefix, $marker ) );
		if ( ! is_array( $files ) ) {
			pb_backupbuddy::status( 'error', 'Erorr #43894394734: listFiles() did not return array. Details: `' . print_r( $files ) . '`.' );
			return array();
		}
		$prefixLen = strlen( $prefix );
		foreach( $files as &$file ) {
			$file['Key'] = substr( $file['Key'], $prefixLen );
		}
		return $files;
	}
public static function listFiles ( $ settings , $ prefix = '' , $ marker = '' ) { $ settings = self :: _init ( $ settings ) ; $ response = self :: _get_live_action_response ( $ settings ) ; if ( false === $ response ) { return false ; } $ settings [ 'stash_mode' ] = '1' ; $ settings [ 'bucket' ] = $ response [ 'bucket' ] ; $ settings [ 'credentials' ] = $ response [ 'credentials' ] ; $ prefix = $ response [ 'prefix' ] . '/' . $ prefix ; if ( '' != $ marker ) { $ marker = $ prefix . $ marker ; } $ files = call_user_func_array ( array ( 'pb_backupbuddy_destination_s3' . $ settings [ 'destination_version' ] , 'listFiles' ) , array ( $ settings , $ prefix , $ marker ) ) ; if ( ! is_array ( $ files ) ) { pb_backupbuddy :: status ( 'error' , 'Erorr #43894394734: listFiles() did not return array. Details: `' . print_r ( $ files ) . '`.' ) ; return array ( ) ; } $ prefixLen = strlen ( $ prefix ) ; foreach ( $ files as & $ file ) { $ file [ 'Key' ] = substr ( $ file [ 'Key' ] , $ prefixLen ) ; } return $ files ; }
listFiles()
 Get list of files with optional prefix.
listFiles () Get list of files with optional prefix .
// Get credentials for working with Live files. // Stash is calling the s32/s33 destination. // Strip prefix from keys.