public static function get_moodle_file($reference) {
        $params = file_storage::unpack_reference($reference, true);
        $fs = get_file_storage();
        return $fs->get_file($params['contextid'], $params['component'], $params['filearea'],
                    $params['itemid'], $params['filepath'], $params['filename']);
    }
public static function get_moodle_file($reference) {
        $params = file_storage::unpack_reference($reference, true);
        $fs = get_file_storage();
        return $fs->get_file($params['contextid'], $params['component'], $params['filearea'],
                    $params['itemid'], $params['filepath'], $params['filename']);
    }
public static function get_moodle_file ( $ reference ) { $ params = file_storage :: unpack_reference ( $ reference , true ) ; $ fs = get_file_storage ( ) ; return $ fs -> get_file ( $ params [ 'contextid' ] , $ params [ 'component' ] , $ params [ 'filearea' ] , $ params [ 'itemid' ] , $ params [ 'filepath' ] , $ params [ 'filename' ] ) ; }
Parses the moodle file reference and returns an instance of stored_file

@param string $reference reference to the moodle internal file as retruned by
{@link repository::get_file_reference()} or {@link file_storage::pack_reference()}
@return stored_file|null
Parses the moodle file reference and returns an instance of stored_file