WordPress at Your Fingertips
function is not described

render_block_core_file() WP 1.0

When the core/file block is rendering, check if we need to enqueue the 'wp-block-file-view script.

No Hooks.

Return

String. Returns the block content.

Usage

render_block_core_file( $attributes, $content );
$attributes(array) (required)
The block attributes.
$content(array) (required)
The block content.

Code of render_block_core_file() WP 5.8.2

function render_block_core_file( $attributes, $content ) {
	$should_load_view_script = ! empty( $attributes['displayPreview'] ) && ! wp_script_is( 'wp-block-file-view' );
	if ( $should_load_view_script ) {
		wp_enqueue_script( 'wp-block-file-view' );
	}

	return $content;
}