@@ -640,6 +640,42 @@ garrow_file_system_create(const gchar *uri, GError **error)
640640 }
641641}
642642
643+ /* *
644+ * garrow_file_system_example_accept_options:
645+ * @string_value: A string option value.
646+ * @int_value: An integer option value.
647+ * @typed_value: An integer used to build a typed option value.
648+ * @error: (nullable): Return location for a #GError or %NULL.
649+ *
650+ * This is a showcase demonstrating that backend-specific options, stored
651+ * as `std::any` in #arrow::fs::FileSystemFactoryOptions, can be built from
652+ * the C GLib bindings and consumed by Arrow C++.
653+ *
654+ * Returns: (nullable) (transfer full): A string describing the options
655+ * received by Arrow C++, or %NULL on error.
656+ *
657+ * Since: 25.0.0
658+ */
659+ gchar *
660+ garrow_file_system_example_accept_options (const gchar *string_value,
661+ gint int_value,
662+ gint typed_value,
663+ GError **error)
664+ {
665+ arrow::fs::FileSystemFactoryOptions options = {
666+ {" example_option_string" , std::any{std::string (string_value)}},
667+ {" example_option_int" , std::any{static_cast <int >(int_value)}},
668+ {" example_option_typed_var" ,
669+ std::any{arrow::fs::ExampleOption (static_cast <int >(typed_value))}},
670+ };
671+ auto result = arrow::fs::ExampleAcceptOptions (options);
672+ if (garrow::check (error, result, " [file-system][example-accept-options]" )) {
673+ return g_strdup (result->c_str ());
674+ } else {
675+ return NULL ;
676+ }
677+ }
678+
643679/* *
644680 * garrow_file_system_get_type_name:
645681 * @file_system: A #GArrowFileSystem.
0 commit comments