1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
// This file was generated by gir (4b09025) from gir-files (71d73f0) // DO NOT EDIT use AppInfo; use Cancellable; use Error; use FileInfo; use FileQueryInfoFlags; use FileType; use ffi; use glib::object::IsA; use glib::translate::*; use gobject_ffi; use std; use std::ptr; glib_wrapper! { pub struct File(Object<ffi::GFile>); match fn { get_type => || ffi::g_file_get_type(), } } impl File { pub fn new_for_commandline_arg(arg: &str) -> File { unsafe { from_glib_full(ffi::g_file_new_for_commandline_arg(arg.to_glib_none().0)) } } #[cfg(feature = "v2_36")] pub fn new_for_commandline_arg_and_cwd<P: AsRef<std::path::Path>>(arg: &str, cwd: P) -> File { unsafe { from_glib_full(ffi::g_file_new_for_commandline_arg_and_cwd(arg.to_glib_none().0, cwd.as_ref().to_glib_none().0)) } } pub fn new_for_path<P: AsRef<std::path::Path>>(path: P) -> File { unsafe { from_glib_full(ffi::g_file_new_for_path(path.as_ref().to_glib_none().0)) } } pub fn new_for_uri(uri: &str) -> File { unsafe { from_glib_full(ffi::g_file_new_for_uri(uri.to_glib_none().0)) } } //pub fn new_tmp<P: AsRef<std::path::Path>>(tmpl: P, iostream: /*Ignored*/FileIOStream) -> Result<File, Error> { // unsafe { TODO: call ffi::g_file_new_tmp() } //} pub fn parse_name(parse_name: &str) -> Option<File> { unsafe { from_glib_full(ffi::g_file_parse_name(parse_name.to_glib_none().0)) } } } pub trait FileExt { //fn append_to<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: FileCreateFlags, cancellable: P) -> Result</*Ignored*/FileOutputStream, Error>; //fn append_to_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: FileCreateFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn append_to_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileOutputStream, Error>; //fn copy<'a, 'b, P: IsA<File>, Q: Into<Option<&'a Cancellable>>, R: Into<Option<&'b /*Unimplemented*/FileProgressCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, destination: &P, flags: /*Ignored*/FileCopyFlags, cancellable: Q, progress_callback: R, progress_callback_data: S) -> Result<(), Error>; //fn copy_async<'a, 'b, 'c, P: IsA<File>, Q: Into<Option<&'a Cancellable>>, R: Into<Option<&'b /*Unimplemented*/FileProgressCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>, T: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, U: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, destination: &P, flags: /*Ignored*/FileCopyFlags, io_priority: i32, cancellable: Q, progress_callback: R, progress_callback_data: S, callback: T, user_data: U); //fn copy_attributes<'a, P: IsA<File>, Q: Into<Option<&'a Cancellable>>>(&self, destination: &P, flags: /*Ignored*/FileCopyFlags, cancellable: Q) -> Result<(), Error>; //fn copy_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<(), Error>; //fn create<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: FileCreateFlags, cancellable: P) -> Result</*Ignored*/FileOutputStream, Error>; //fn create_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: FileCreateFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn create_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileOutputStream, Error>; //fn create_readwrite<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: FileCreateFlags, cancellable: P) -> Result</*Ignored*/FileIOStream, Error>; //fn create_readwrite_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: FileCreateFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn create_readwrite_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileIOStream, Error>; fn delete<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<(), Error>; //#[cfg(feature = "v2_34")] //fn delete_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R); //#[cfg(feature = "v2_34")] //fn delete_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; fn dup(&self) -> Option<File>; //fn eject_mountable<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, cancellable: P, callback: Q, user_data: R); //fn eject_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; //fn eject_mountable_with_operation<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S); //fn eject_mountable_with_operation_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; //fn enumerate_children<'a, P: Into<Option<&'a Cancellable>>>(&self, attributes: &str, flags: FileQueryInfoFlags, cancellable: P) -> Result</*Ignored*/FileEnumerator, Error>; //fn enumerate_children_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, attributes: &str, flags: FileQueryInfoFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn enumerate_children_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileEnumerator, Error>; fn equal<P: IsA<File>>(&self, file2: &P) -> bool; //fn find_enclosing_mount<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/Mount, Error>; //fn find_enclosing_mount_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn find_enclosing_mount_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/Mount, Error>; fn get_basename(&self) -> Option<std::path::PathBuf>; fn get_child<P: AsRef<std::path::Path>>(&self, name: P) -> Option<File>; fn get_child_for_display_name(&self, display_name: &str) -> Result<File, Error>; fn get_parent(&self) -> Option<File>; fn get_parse_name(&self) -> Option<String>; fn get_path(&self) -> Option<std::path::PathBuf>; fn get_relative_path<P: IsA<File>>(&self, descendant: &P) -> Option<std::path::PathBuf>; fn get_uri(&self) -> Option<String>; fn get_uri_scheme(&self) -> Option<String>; fn has_parent<'a, P: IsA<File> + 'a, Q: Into<Option<&'a P>>>(&self, parent: Q) -> bool; fn has_prefix<P: IsA<File>>(&self, prefix: &P) -> bool; fn has_uri_scheme(&self, uri_scheme: &str) -> bool; fn is_native(&self) -> bool; //fn load_contents<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P, contents: /*Unimplemented*/CArray TypeId { ns_id: 0, id: 3 }) -> Result<(usize, String), Error>; //fn load_contents_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, cancellable: P, callback: Q, user_data: R); //fn load_contents_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P, contents: /*Unimplemented*/CArray TypeId { ns_id: 0, id: 3 }) -> Result<(usize, String), Error>; //fn load_partial_contents_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, cancellable: P, read_more_callback: /*Unknown conversion*//*Unimplemented*/FileReadMoreCallback, callback: Q, user_data: R); //fn load_partial_contents_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P, contents: /*Unimplemented*/CArray TypeId { ns_id: 0, id: 3 }) -> Result<(usize, String), Error>; fn make_directory<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<(), Error>; //#[cfg(feature = "v2_38")] //fn make_directory_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R); //#[cfg(feature = "v2_38")] //fn make_directory_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; fn make_directory_with_parents<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<(), Error>; fn make_symbolic_link<'a, P: AsRef<std::path::Path>, Q: Into<Option<&'a Cancellable>>>(&self, symlink_value: P, cancellable: Q) -> Result<(), Error>; //#[cfg(feature = "v2_38")] //fn measure_disk_usage<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/FileMeasureProgressCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/FileMeasureFlags, cancellable: P, progress_callback: Q, progress_data: R) -> Result<(u64, u64, u64), Error>; //#[cfg(feature = "v2_38")] //fn measure_disk_usage_async<'a, 'b, 'c, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/FileMeasureProgressCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>, S: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, T: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/FileMeasureFlags, io_priority: i32, cancellable: P, progress_callback: Q, progress_data: R, callback: S, user_data: T); //#[cfg(feature = "v2_38")] //fn measure_disk_usage_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(u64, u64, u64), Error>; //fn monitor<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: /*Ignored*/FileMonitorFlags, cancellable: P) -> Result</*Ignored*/FileMonitor, Error>; //fn monitor_directory<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: /*Ignored*/FileMonitorFlags, cancellable: P) -> Result</*Ignored*/FileMonitor, Error>; //fn monitor_file<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: /*Ignored*/FileMonitorFlags, cancellable: P) -> Result</*Ignored*/FileMonitor, Error>; //fn mount_enclosing_volume<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountMountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S); //fn mount_enclosing_volume_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; //fn mount_mountable<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountMountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S); //fn mount_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<File, Error>; //fn move_<'a, 'b, P: IsA<File>, Q: Into<Option<&'a Cancellable>>, R: Into<Option<&'b /*Unimplemented*/FileProgressCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, destination: &P, flags: /*Ignored*/FileCopyFlags, cancellable: Q, progress_callback: R, progress_callback_data: S) -> Result<(), Error>; //fn open_readwrite<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/FileIOStream, Error>; //fn open_readwrite_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn open_readwrite_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileIOStream, Error>; //fn poll_mountable<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, cancellable: P, callback: Q, user_data: R); //fn poll_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; fn query_default_handler<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<AppInfo, Error>; fn query_exists<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> bool; fn query_file_type<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: FileQueryInfoFlags, cancellable: P) -> FileType; fn query_filesystem_info<'a, P: Into<Option<&'a Cancellable>>>(&self, attributes: &str, cancellable: P) -> Result<FileInfo, Error>; //fn query_filesystem_info_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, attributes: &str, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn query_filesystem_info_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<FileInfo, Error>; fn query_info<'a, P: Into<Option<&'a Cancellable>>>(&self, attributes: &str, flags: FileQueryInfoFlags, cancellable: P) -> Result<FileInfo, Error>; //fn query_info_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, attributes: &str, flags: FileQueryInfoFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn query_info_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<FileInfo, Error>; //fn query_settable_attributes<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/FileAttributeInfoList, Error>; //fn query_writable_namespaces<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/FileAttributeInfoList, Error>; //fn read<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/FileInputStream, Error>; //fn read_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn read_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileInputStream, Error>; //fn replace<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(&self, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q) -> Result</*Ignored*/FileOutputStream, Error>; //fn replace_async<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, etag: P, make_backup: bool, flags: FileCreateFlags, io_priority: i32, cancellable: Q, callback: R, user_data: S); //fn replace_contents<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(&self, contents: /*Unimplemented*/&CArray TypeId { ns_id: 0, id: 3 }, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q) -> Result<String, Error>; //fn replace_contents_async<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, contents: /*Unimplemented*/&CArray TypeId { ns_id: 0, id: 3 }, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q, callback: R, user_data: S); //#[cfg(feature = "v2_40")] //fn replace_contents_bytes_async<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, contents: &glib::Bytes, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q, callback: R, user_data: S); //fn replace_contents_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<String, Error>; //fn replace_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileOutputStream, Error>; //fn replace_readwrite<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(&self, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q) -> Result</*Ignored*/FileIOStream, Error>; //fn replace_readwrite_async<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, etag: P, make_backup: bool, flags: FileCreateFlags, io_priority: i32, cancellable: Q, callback: R, user_data: S); //fn replace_readwrite_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileIOStream, Error>; fn resolve_relative_path<P: AsRef<std::path::Path>>(&self, relative_path: P) -> Option<File>; //fn set_attribute<'a, P: Into<Option</*Unimplemented*/Fundamental: Pointer>>, Q: Into<Option<&'a Cancellable>>>(&self, attribute: &str, type_: /*Ignored*/FileAttributeType, value_p: P, flags: FileQueryInfoFlags, cancellable: Q) -> Result<(), Error>; fn set_attribute_byte_string<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: &str, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error>; fn set_attribute_int32<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: i32, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error>; fn set_attribute_int64<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: i64, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error>; fn set_attribute_string<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: &str, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error>; fn set_attribute_uint32<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: u32, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error>; fn set_attribute_uint64<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: u64, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error>; //fn set_attributes_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, info: &FileInfo, flags: FileQueryInfoFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn set_attributes_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<FileInfo, Error>; fn set_attributes_from_info<'a, P: Into<Option<&'a Cancellable>>>(&self, info: &FileInfo, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error>; fn set_display_name<'a, P: Into<Option<&'a Cancellable>>>(&self, display_name: &str, cancellable: P) -> Result<File, Error>; //fn set_display_name_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, display_name: &str, io_priority: i32, cancellable: P, callback: Q, user_data: R); //fn set_display_name_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<File, Error>; //fn start_mountable<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/DriveStartFlags, start_operation: P, cancellable: Q, callback: R, user_data: S); //fn start_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; //fn stop_mountable<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S); //fn stop_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; fn supports_thread_contexts(&self) -> bool; fn trash<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<(), Error>; //#[cfg(feature = "v2_38")] //fn trash_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R); //#[cfg(feature = "v2_38")] //fn trash_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; //fn unmount_mountable<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, cancellable: P, callback: Q, user_data: R); //fn unmount_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; //fn unmount_mountable_with_operation<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S); //fn unmount_mountable_with_operation_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error>; } impl<O: IsA<File>> FileExt for O { //fn append_to<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: FileCreateFlags, cancellable: P) -> Result</*Ignored*/FileOutputStream, Error> { // unsafe { TODO: call ffi::g_file_append_to() } //} //fn append_to_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: FileCreateFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_append_to_async() } //} //fn append_to_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileOutputStream, Error> { // unsafe { TODO: call ffi::g_file_append_to_finish() } //} //fn copy<'a, 'b, P: IsA<File>, Q: Into<Option<&'a Cancellable>>, R: Into<Option<&'b /*Unimplemented*/FileProgressCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, destination: &P, flags: /*Ignored*/FileCopyFlags, cancellable: Q, progress_callback: R, progress_callback_data: S) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_copy() } //} //fn copy_async<'a, 'b, 'c, P: IsA<File>, Q: Into<Option<&'a Cancellable>>, R: Into<Option<&'b /*Unimplemented*/FileProgressCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>, T: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, U: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, destination: &P, flags: /*Ignored*/FileCopyFlags, io_priority: i32, cancellable: Q, progress_callback: R, progress_callback_data: S, callback: T, user_data: U) { // unsafe { TODO: call ffi::g_file_copy_async() } //} //fn copy_attributes<'a, P: IsA<File>, Q: Into<Option<&'a Cancellable>>>(&self, destination: &P, flags: /*Ignored*/FileCopyFlags, cancellable: Q) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_copy_attributes() } //} //fn copy_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_copy_finish() } //} //fn create<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: FileCreateFlags, cancellable: P) -> Result</*Ignored*/FileOutputStream, Error> { // unsafe { TODO: call ffi::g_file_create() } //} //fn create_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: FileCreateFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_create_async() } //} //fn create_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileOutputStream, Error> { // unsafe { TODO: call ffi::g_file_create_finish() } //} //fn create_readwrite<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: FileCreateFlags, cancellable: P) -> Result</*Ignored*/FileIOStream, Error> { // unsafe { TODO: call ffi::g_file_create_readwrite() } //} //fn create_readwrite_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: FileCreateFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_create_readwrite_async() } //} //fn create_readwrite_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileIOStream, Error> { // unsafe { TODO: call ffi::g_file_create_readwrite_finish() } //} fn delete<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_delete(self.to_glib_none().0, cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } //#[cfg(feature = "v2_34")] //fn delete_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_delete_async() } //} //#[cfg(feature = "v2_34")] //fn delete_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_delete_finish() } //} fn dup(&self) -> Option<File> { unsafe { from_glib_full(ffi::g_file_dup(self.to_glib_none().0)) } } //fn eject_mountable<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_eject_mountable() } //} //fn eject_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_eject_mountable_finish() } //} //fn eject_mountable_with_operation<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_eject_mountable_with_operation() } //} //fn eject_mountable_with_operation_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_eject_mountable_with_operation_finish() } //} //fn enumerate_children<'a, P: Into<Option<&'a Cancellable>>>(&self, attributes: &str, flags: FileQueryInfoFlags, cancellable: P) -> Result</*Ignored*/FileEnumerator, Error> { // unsafe { TODO: call ffi::g_file_enumerate_children() } //} //fn enumerate_children_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, attributes: &str, flags: FileQueryInfoFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_enumerate_children_async() } //} //fn enumerate_children_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileEnumerator, Error> { // unsafe { TODO: call ffi::g_file_enumerate_children_finish() } //} fn equal<P: IsA<File>>(&self, file2: &P) -> bool { unsafe { from_glib(ffi::g_file_equal(self.to_glib_none().0, file2.to_glib_none().0)) } } //fn find_enclosing_mount<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/Mount, Error> { // unsafe { TODO: call ffi::g_file_find_enclosing_mount() } //} //fn find_enclosing_mount_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_find_enclosing_mount_async() } //} //fn find_enclosing_mount_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/Mount, Error> { // unsafe { TODO: call ffi::g_file_find_enclosing_mount_finish() } //} fn get_basename(&self) -> Option<std::path::PathBuf> { unsafe { from_glib_full(ffi::g_file_get_basename(self.to_glib_none().0)) } } fn get_child<P: AsRef<std::path::Path>>(&self, name: P) -> Option<File> { unsafe { from_glib_full(ffi::g_file_get_child(self.to_glib_none().0, name.as_ref().to_glib_none().0)) } } fn get_child_for_display_name(&self, display_name: &str) -> Result<File, Error> { unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_file_get_child_for_display_name(self.to_glib_none().0, display_name.to_glib_none().0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } fn get_parent(&self) -> Option<File> { unsafe { from_glib_full(ffi::g_file_get_parent(self.to_glib_none().0)) } } fn get_parse_name(&self) -> Option<String> { unsafe { from_glib_full(ffi::g_file_get_parse_name(self.to_glib_none().0)) } } fn get_path(&self) -> Option<std::path::PathBuf> { unsafe { from_glib_full(ffi::g_file_get_path(self.to_glib_none().0)) } } fn get_relative_path<P: IsA<File>>(&self, descendant: &P) -> Option<std::path::PathBuf> { unsafe { from_glib_full(ffi::g_file_get_relative_path(self.to_glib_none().0, descendant.to_glib_none().0)) } } fn get_uri(&self) -> Option<String> { unsafe { from_glib_full(ffi::g_file_get_uri(self.to_glib_none().0)) } } fn get_uri_scheme(&self) -> Option<String> { unsafe { from_glib_full(ffi::g_file_get_uri_scheme(self.to_glib_none().0)) } } fn has_parent<'a, P: IsA<File> + 'a, Q: Into<Option<&'a P>>>(&self, parent: Q) -> bool { let parent = parent.into(); let parent = parent.to_glib_none(); unsafe { from_glib(ffi::g_file_has_parent(self.to_glib_none().0, parent.0)) } } fn has_prefix<P: IsA<File>>(&self, prefix: &P) -> bool { unsafe { from_glib(ffi::g_file_has_prefix(self.to_glib_none().0, prefix.to_glib_none().0)) } } fn has_uri_scheme(&self, uri_scheme: &str) -> bool { unsafe { from_glib(ffi::g_file_has_uri_scheme(self.to_glib_none().0, uri_scheme.to_glib_none().0)) } } fn is_native(&self) -> bool { unsafe { from_glib(ffi::g_file_is_native(self.to_glib_none().0)) } } //fn load_contents<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P, contents: /*Unimplemented*/CArray TypeId { ns_id: 0, id: 3 }) -> Result<(usize, String), Error> { // unsafe { TODO: call ffi::g_file_load_contents() } //} //fn load_contents_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_load_contents_async() } //} //fn load_contents_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P, contents: /*Unimplemented*/CArray TypeId { ns_id: 0, id: 3 }) -> Result<(usize, String), Error> { // unsafe { TODO: call ffi::g_file_load_contents_finish() } //} //fn load_partial_contents_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, cancellable: P, read_more_callback: /*Unknown conversion*//*Unimplemented*/FileReadMoreCallback, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_load_partial_contents_async() } //} //fn load_partial_contents_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P, contents: /*Unimplemented*/CArray TypeId { ns_id: 0, id: 3 }) -> Result<(usize, String), Error> { // unsafe { TODO: call ffi::g_file_load_partial_contents_finish() } //} fn make_directory<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_make_directory(self.to_glib_none().0, cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } //#[cfg(feature = "v2_38")] //fn make_directory_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_make_directory_async() } //} //#[cfg(feature = "v2_38")] //fn make_directory_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_make_directory_finish() } //} fn make_directory_with_parents<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_make_directory_with_parents(self.to_glib_none().0, cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn make_symbolic_link<'a, P: AsRef<std::path::Path>, Q: Into<Option<&'a Cancellable>>>(&self, symlink_value: P, cancellable: Q) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_make_symbolic_link(self.to_glib_none().0, symlink_value.as_ref().to_glib_none().0, cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } //#[cfg(feature = "v2_38")] //fn measure_disk_usage<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/FileMeasureProgressCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/FileMeasureFlags, cancellable: P, progress_callback: Q, progress_data: R) -> Result<(u64, u64, u64), Error> { // unsafe { TODO: call ffi::g_file_measure_disk_usage() } //} //#[cfg(feature = "v2_38")] //fn measure_disk_usage_async<'a, 'b, 'c, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/FileMeasureProgressCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>, S: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, T: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/FileMeasureFlags, io_priority: i32, cancellable: P, progress_callback: Q, progress_data: R, callback: S, user_data: T) { // unsafe { TODO: call ffi::g_file_measure_disk_usage_async() } //} //#[cfg(feature = "v2_38")] //fn measure_disk_usage_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(u64, u64, u64), Error> { // unsafe { TODO: call ffi::g_file_measure_disk_usage_finish() } //} //fn monitor<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: /*Ignored*/FileMonitorFlags, cancellable: P) -> Result</*Ignored*/FileMonitor, Error> { // unsafe { TODO: call ffi::g_file_monitor() } //} //fn monitor_directory<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: /*Ignored*/FileMonitorFlags, cancellable: P) -> Result</*Ignored*/FileMonitor, Error> { // unsafe { TODO: call ffi::g_file_monitor_directory() } //} //fn monitor_file<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: /*Ignored*/FileMonitorFlags, cancellable: P) -> Result</*Ignored*/FileMonitor, Error> { // unsafe { TODO: call ffi::g_file_monitor_file() } //} //fn mount_enclosing_volume<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountMountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_mount_enclosing_volume() } //} //fn mount_enclosing_volume_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_mount_enclosing_volume_finish() } //} //fn mount_mountable<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountMountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_mount_mountable() } //} //fn mount_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<File, Error> { // unsafe { TODO: call ffi::g_file_mount_mountable_finish() } //} //fn move_<'a, 'b, P: IsA<File>, Q: Into<Option<&'a Cancellable>>, R: Into<Option<&'b /*Unimplemented*/FileProgressCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, destination: &P, flags: /*Ignored*/FileCopyFlags, cancellable: Q, progress_callback: R, progress_callback_data: S) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_move() } //} //fn open_readwrite<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/FileIOStream, Error> { // unsafe { TODO: call ffi::g_file_open_readwrite() } //} //fn open_readwrite_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_open_readwrite_async() } //} //fn open_readwrite_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileIOStream, Error> { // unsafe { TODO: call ffi::g_file_open_readwrite_finish() } //} //fn poll_mountable<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_poll_mountable() } //} //fn poll_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_poll_mountable_finish() } //} fn query_default_handler<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<AppInfo, Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_file_query_default_handler(self.to_glib_none().0, cancellable.0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } fn query_exists<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> bool { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { from_glib(ffi::g_file_query_exists(self.to_glib_none().0, cancellable.0)) } } fn query_file_type<'a, P: Into<Option<&'a Cancellable>>>(&self, flags: FileQueryInfoFlags, cancellable: P) -> FileType { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { from_glib(ffi::g_file_query_file_type(self.to_glib_none().0, flags.to_glib(), cancellable.0)) } } fn query_filesystem_info<'a, P: Into<Option<&'a Cancellable>>>(&self, attributes: &str, cancellable: P) -> Result<FileInfo, Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_file_query_filesystem_info(self.to_glib_none().0, attributes.to_glib_none().0, cancellable.0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } //fn query_filesystem_info_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, attributes: &str, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_query_filesystem_info_async() } //} //fn query_filesystem_info_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<FileInfo, Error> { // unsafe { TODO: call ffi::g_file_query_filesystem_info_finish() } //} fn query_info<'a, P: Into<Option<&'a Cancellable>>>(&self, attributes: &str, flags: FileQueryInfoFlags, cancellable: P) -> Result<FileInfo, Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_file_query_info(self.to_glib_none().0, attributes.to_glib_none().0, flags.to_glib(), cancellable.0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } //fn query_info_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, attributes: &str, flags: FileQueryInfoFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_query_info_async() } //} //fn query_info_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<FileInfo, Error> { // unsafe { TODO: call ffi::g_file_query_info_finish() } //} //fn query_settable_attributes<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/FileAttributeInfoList, Error> { // unsafe { TODO: call ffi::g_file_query_settable_attributes() } //} //fn query_writable_namespaces<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/FileAttributeInfoList, Error> { // unsafe { TODO: call ffi::g_file_query_writable_namespaces() } //} //fn read<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result</*Ignored*/FileInputStream, Error> { // unsafe { TODO: call ffi::g_file_read() } //} //fn read_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_read_async() } //} //fn read_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileInputStream, Error> { // unsafe { TODO: call ffi::g_file_read_finish() } //} //fn replace<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(&self, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q) -> Result</*Ignored*/FileOutputStream, Error> { // unsafe { TODO: call ffi::g_file_replace() } //} //fn replace_async<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, etag: P, make_backup: bool, flags: FileCreateFlags, io_priority: i32, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_replace_async() } //} //fn replace_contents<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(&self, contents: /*Unimplemented*/&CArray TypeId { ns_id: 0, id: 3 }, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q) -> Result<String, Error> { // unsafe { TODO: call ffi::g_file_replace_contents() } //} //fn replace_contents_async<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, contents: /*Unimplemented*/&CArray TypeId { ns_id: 0, id: 3 }, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_replace_contents_async() } //} //#[cfg(feature = "v2_40")] //fn replace_contents_bytes_async<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, contents: &glib::Bytes, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_replace_contents_bytes_async() } //} //fn replace_contents_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<String, Error> { // unsafe { TODO: call ffi::g_file_replace_contents_finish() } //} //fn replace_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileOutputStream, Error> { // unsafe { TODO: call ffi::g_file_replace_finish() } //} //fn replace_readwrite<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>>(&self, etag: P, make_backup: bool, flags: FileCreateFlags, cancellable: Q) -> Result</*Ignored*/FileIOStream, Error> { // unsafe { TODO: call ffi::g_file_replace_readwrite() } //} //fn replace_readwrite_async<'a, 'b, 'c, P: Into<Option<&'a str>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, etag: P, make_backup: bool, flags: FileCreateFlags, io_priority: i32, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_replace_readwrite_async() } //} //fn replace_readwrite_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result</*Ignored*/FileIOStream, Error> { // unsafe { TODO: call ffi::g_file_replace_readwrite_finish() } //} fn resolve_relative_path<P: AsRef<std::path::Path>>(&self, relative_path: P) -> Option<File> { unsafe { from_glib_full(ffi::g_file_resolve_relative_path(self.to_glib_none().0, relative_path.as_ref().to_glib_none().0)) } } //fn set_attribute<'a, P: Into<Option</*Unimplemented*/Fundamental: Pointer>>, Q: Into<Option<&'a Cancellable>>>(&self, attribute: &str, type_: /*Ignored*/FileAttributeType, value_p: P, flags: FileQueryInfoFlags, cancellable: Q) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_set_attribute() } //} fn set_attribute_byte_string<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: &str, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_set_attribute_byte_string(self.to_glib_none().0, attribute.to_glib_none().0, value.to_glib_none().0, flags.to_glib(), cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn set_attribute_int32<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: i32, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_set_attribute_int32(self.to_glib_none().0, attribute.to_glib_none().0, value, flags.to_glib(), cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn set_attribute_int64<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: i64, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_set_attribute_int64(self.to_glib_none().0, attribute.to_glib_none().0, value, flags.to_glib(), cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn set_attribute_string<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: &str, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_set_attribute_string(self.to_glib_none().0, attribute.to_glib_none().0, value.to_glib_none().0, flags.to_glib(), cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn set_attribute_uint32<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: u32, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_set_attribute_uint32(self.to_glib_none().0, attribute.to_glib_none().0, value, flags.to_glib(), cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn set_attribute_uint64<'a, P: Into<Option<&'a Cancellable>>>(&self, attribute: &str, value: u64, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_set_attribute_uint64(self.to_glib_none().0, attribute.to_glib_none().0, value, flags.to_glib(), cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } //fn set_attributes_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, info: &FileInfo, flags: FileQueryInfoFlags, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_set_attributes_async() } //} //fn set_attributes_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<FileInfo, Error> { // unsafe { TODO: call ffi::g_file_set_attributes_finish() } //} fn set_attributes_from_info<'a, P: Into<Option<&'a Cancellable>>>(&self, info: &FileInfo, flags: FileQueryInfoFlags, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_set_attributes_from_info(self.to_glib_none().0, info.to_glib_none().0, flags.to_glib(), cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } fn set_display_name<'a, P: Into<Option<&'a Cancellable>>>(&self, display_name: &str, cancellable: P) -> Result<File, Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let ret = ffi::g_file_set_display_name(self.to_glib_none().0, display_name.to_glib_none().0, cancellable.0, &mut error); if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) } } } //fn set_display_name_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, display_name: &str, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_set_display_name_async() } //} //fn set_display_name_finish<P: IsA</*Ignored*/AsyncResult>>(&self, res: &P) -> Result<File, Error> { // unsafe { TODO: call ffi::g_file_set_display_name_finish() } //} //fn start_mountable<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/DriveStartFlags, start_operation: P, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_start_mountable() } //} //fn start_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_start_mountable_finish() } //} //fn stop_mountable<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_stop_mountable() } //} //fn stop_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_stop_mountable_finish() } //} fn supports_thread_contexts(&self) -> bool { unsafe { from_glib(ffi::g_file_supports_thread_contexts(self.to_glib_none().0)) } } fn trash<'a, P: Into<Option<&'a Cancellable>>>(&self, cancellable: P) -> Result<(), Error> { let cancellable = cancellable.into(); let cancellable = cancellable.to_glib_none(); unsafe { let mut error = ptr::null_mut(); let _ = ffi::g_file_trash(self.to_glib_none().0, cancellable.0, &mut error); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } //#[cfg(feature = "v2_38")] //fn trash_async<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, io_priority: i32, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_trash_async() } //} //#[cfg(feature = "v2_38")] //fn trash_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_trash_finish() } //} //fn unmount_mountable<'a, 'b, P: Into<Option<&'a Cancellable>>, Q: Into<Option<&'b /*Unimplemented*/AsyncReadyCallback>>, R: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, cancellable: P, callback: Q, user_data: R) { // unsafe { TODO: call ffi::g_file_unmount_mountable() } //} //fn unmount_mountable_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_unmount_mountable_finish() } //} //fn unmount_mountable_with_operation<'a, 'b, 'c, P: Into<Option<&'a /*Ignored*/MountOperation>>, Q: Into<Option<&'b Cancellable>>, R: Into<Option<&'c /*Unimplemented*/AsyncReadyCallback>>, S: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, flags: /*Ignored*/MountUnmountFlags, mount_operation: P, cancellable: Q, callback: R, user_data: S) { // unsafe { TODO: call ffi::g_file_unmount_mountable_with_operation() } //} //fn unmount_mountable_with_operation_finish<P: IsA</*Ignored*/AsyncResult>>(&self, result: &P) -> Result<(), Error> { // unsafe { TODO: call ffi::g_file_unmount_mountable_with_operation_finish() } //} }