| 467 | } |
| 468 | |
| 469 | static void |
| 470 | garrow_file_selector_class_init(GArrowFileSelectorClass *klass) |
| 471 | { |
| 472 | GParamSpec *spec; |
| 473 | |
| 474 | auto gobject_class = G_OBJECT_CLASS(klass); |
| 475 | |
| 476 | gobject_class->finalize = garrow_file_selector_finalize; |
| 477 | gobject_class->set_property = garrow_file_selector_set_property; |
| 478 | gobject_class->get_property = garrow_file_selector_get_property; |
| 479 | |
| 480 | auto file_selector = arrow::fs::FileSelector(); |
| 481 | |
| 482 | /** |
| 483 | * GArrowFileSelector:base-dir: |
| 484 | * |
| 485 | * The directory in which to select files. |
| 486 | * If the path exists but doesn't point to a directory, this should |
| 487 | * be an error. |
| 488 | * |
| 489 | * Since: 0.17.0 |
| 490 | */ |
| 491 | spec = g_param_spec_string("base-dir", |
| 492 | "Base dir", |
| 493 | "The directory in which to select files", |
| 494 | file_selector.base_dir.c_str(), |
| 495 | static_cast<GParamFlags>(G_PARAM_READWRITE)); |
| 496 | g_object_class_install_property(gobject_class, PROP_FILE_SELECTOR_BASE_DIR, spec); |
| 497 | |
| 498 | /** |
| 499 | * GArrowFileSelector:allow-not-found: |
| 500 | * |
| 501 | * The behavior if `base_dir` isn't found in the file system. |
| 502 | * If false, an error is returned. If true, an empty selection is returned. |
| 503 | * |
| 504 | * Since: 0.17.0 |
| 505 | */ |
| 506 | spec = g_param_spec_boolean("allow-not-found", |
| 507 | "Allow not found", |
| 508 | "The behavior if `base_dir` isn't found in the file system", |
| 509 | file_selector.allow_not_found, |
| 510 | static_cast<GParamFlags>(G_PARAM_READWRITE)); |
| 511 | g_object_class_install_property(gobject_class, |
| 512 | PROP_FILE_SELECTOR_ALLOW_NOT_FOUND, |
| 513 | spec); |
| 514 | |
| 515 | /** |
| 516 | * GArrowFileSelector:recursive: |
| 517 | * |
| 518 | * Whether to recurse into subdirectories. |
| 519 | * |
| 520 | * Since: 0.17.0 |
| 521 | */ |
| 522 | spec = g_param_spec_boolean("recursive", |
| 523 | "Recursive", |
| 524 | "Whether to recurse into subdirectories", |
| 525 | file_selector.recursive, |
| 526 | static_cast<GParamFlags>(G_PARAM_READWRITE)); |
nothing calls this directly
no test coverage detected