1<root> 2<!-- These are preprocessor defines. Don't substitute. --> 3<substitute_enumerator_name from="G_MAXSSIZE" to="G_MAXSSIZE" /> 4<substitute_enumerator_name from="G_MAXINT" to="G_MAXINT" /> 5<substitute_enumerator_name from="G_CONVERT_ERROR" to="G_CONVERT_ERROR" /> 6<substitute_enumerator_name from="G_DBUS_ERROR" to="G_DBUS_ERROR" /> 7<substitute_enumerator_name from="G_RESOURCE_ERROR" to="G_RESOURCE_ERROR" /> 8<substitute_enumerator_name from="G_RESOLVER_ERROR" to="G_RESOLVER_ERROR" /> 9<substitute_enumerator_name from="G_TLS_ERROR" to="G_TLS_ERROR" /> 10<substitute_enumerator_name from_prefix="G_FILE_ATTRIBUTE_" to_prefix="G_FILE_ATTRIBUTE_" /> 11<substitute_enumerator_name from_prefix="G_MENU_ATTRIBUTE_" to_prefix="G_MENU_ATTRIBUTE_" /> 12<substitute_enumerator_name from_prefix="G_MENU_LINK_" to_prefix="G_MENU_LINK_" /> 13<substitute_enumerator_name from_prefix="G_VARIANT_TYPE_" to_prefix="G_VARIANT_TYPE_" /> 14<substitute_enumerator_name from_prefix="G_TLS_DATABASE_PURPOSE_AUTHENTICATE_" to_prefix="G_TLS_DATABASE_PURPOSE_AUTHENTICATE_" /> 15<substitute_enumerator_name from_prefix="G_KEY_FILE_DESKTOP_KEY_" to_prefix="G_KEY_FILE_DESKTOP_KEY_" /> 16 17<function name="g_file_make_symbolic_link"> 18<description> 19Creates a symbolic link. 20 21The operation can be cancelled by 22triggering the cancellable object from another thread. If the operation 23was cancelled, a Gio::Error will be thrown with CANCELLED. 24 25 26</description> 27<parameters> 28<parameter name="file"> 29<parameter_description> input #GFile. 30</parameter_description> 31</parameter> 32<parameter name="symlink_value"> 33<parameter_description> a string with the value of the new symlink. 34</parameter_description> 35</parameter> 36<parameter name="cancellable"> 37<parameter_description> Cancellable object. 38</parameter_description> 39</parameter> 40<parameter name="error"> 41<parameter_description> a #GError. 42</parameter_description> 43</parameter> 44</parameters> 45<return> %TRUE on the creation of a new symlink, %FALSE otherwise. 46</return> 47</function> 48 49 50<function name="g_file_enumerator_close_finish"> 51<description> 52Finishes closing a file enumerator, started from g_file_enumerator_close_async(). 53 54If the file enumerator was already closed when g_file_enumerator_close_async() 55was called, then this function will throw a Gio::Error with CLOSED, and 56return %FALSE. If the file enumerator had pending operation when the close 57operation was started, then this function will throw a Gio::Error with PENDING, and 58return %FALSE. The operation may have been 59cancelled by triggering the cancellable object from another thread. If the operation 60was cancelled, a Gio::Error with CANCELLED will be thrown, and %FALSE will be 61returned. 62</description> 63</function> 64 65<function name="g_file_append_to"> 66<description> 67Gets an output stream for appending data to the file. If 68the file doesn't already exist it is created. 69 70By default files created are generally readable by everyone, 71but if you pass #G_FILE_CREATE_PRIVATE in @flags the file 72will be made readable only to the current user, to the level that 73is supported on the target filesystem. 74 75The operation can be cancelled by 76triggering the cancellable object from another thread. If the operation 77was cancelled, a Gio::Error will be thrown with CANCELLED. 78 79Some file systems don't allow all file names, and may 80throw a Gio::Error with INVALID_FILENAME. 81If the file is a directory a Gio::Error with IS_DIRECTORY will be 82thrown. Other errors are possible too, and depend on what kind of 83filesystem the file is on. 84 85 86</description> 87<parameters> 88<parameter name="file"> 89<parameter_description> input #GFile. 90</parameter_description> 91</parameter> 92<parameter name="flags"> 93<parameter_description> a set of #GFileCreateFlags. 94</parameter_description> 95</parameter> 96<parameter name="cancellable"> 97<parameter_description> Cancellable object. 98</parameter_description> 99</parameter> 100<parameter name="error"> 101<parameter_description> a #GError, or %NULL 102</parameter_description> 103</parameter> 104</parameters> 105<return> a #GFileOutputStream. 106</return> 107</function> 108 109 110<function name="g_file_set_attribute_int32"> 111<description> 112Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. 113If @attribute is of a different type, this operation will fail. 114 115The operation can be cancelled by 116triggering the cancellable object from another thread. If the operation 117was cancelled, a Gio::Error will be thrown with CANCELLED. 118 119 120</description> 121<parameters> 122<parameter name="file"> 123<parameter_description> input #GFile. 124</parameter_description> 125</parameter> 126<parameter name="attribute"> 127<parameter_description> a string containing the attribute's name. 128</parameter_description> 129</parameter> 130<parameter name="value"> 131<parameter_description> a #gint32 containing the attribute's new value. 132</parameter_description> 133</parameter> 134<parameter name="flags"> 135<parameter_description> a #GFileQueryInfoFlags. 136</parameter_description> 137</parameter> 138<parameter name="cancellable"> 139<parameter_description> Cancellable object. 140</parameter_description> 141</parameter> 142<parameter name="error"> 143<parameter_description> a #GError, or %NULL 144</parameter_description> 145</parameter> 146</parameters> 147<return> %TRUE if the @attribute was successfully set to @value 148in the @file, %FALSE otherwise. 149</return> 150</function> 151 152<function name="g_file_delete"> 153<description> 154Deletes a file. 155 156The operation can be cancelled by 157triggering the cancellable object from another thread. If the operation 158was cancelled, a Gio::Error will be thrown with CANCELLED. 159 160 161</description> 162<parameters> 163<parameter name="file"> 164<parameter_description> input #GFile. 165</parameter_description> 166</parameter> 167<parameter name="cancellable"> 168<parameter_description> Cancellable object. 169</parameter_description> 170</parameter> 171<parameter name="error"> 172<parameter_description> a #GError, or %NULL 173</parameter_description> 174</parameter> 175</parameters> 176<return> %TRUE if the file was deleted. %FALSE otherwise. 177</return> 178</function> 179 180<function name="g_seekable_seek"> 181<description> 182Seeks in the stream by the given @offset, modified by @type. 183 184The operation can be cancelled by 185triggering the cancellable object from another thread. If the operation 186was cancelled, a Gio::Error will be thrown with CANCELLED. 187 188 189</description> 190<parameters> 191<parameter name="seekable"> 192<parameter_description> a #GSeekable. 193</parameter_description> 194</parameter> 195<parameter name="offset"> 196<parameter_description> a #goffset. 197</parameter_description> 198</parameter> 199<parameter name="type"> 200<parameter_description> a #GSeekType. 201</parameter_description> 202</parameter> 203<parameter name="cancellable"> 204<parameter_description> Cancellable object. 205</parameter_description> 206</parameter> 207<parameter name="error"> 208<parameter_description> a #GError location to store the error occuring, or %NULL to 209ignore. 210</parameter_description> 211</parameter> 212</parameters> 213<return> %TRUE if successful. If an error 214has occurred, this function will return %FALSE and set @error 215appropriately if present. 216</return> 217</function> 218 219<function name="g_file_set_display_name"> 220<description> 221Renames @file to the specified display name. 222 223The display name is converted from UTF8 to the correct encoding for the target 224filesystem if possible and the @file is renamed to this. 225 226If you want to implement a rename operation in the user interface the edit name 227(#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the initial value in the rename 228widget, and then the result after editing should be passed to g_file_set_display_name(). 229 230On success the resulting converted filename is returned. 231 232The operation can be cancelled by 233triggering the cancellable object from another thread. If the operation 234was cancelled, a Gio::Error will be thrown with CANCELLED. 235 236 237</description> 238<parameters> 239<parameter name="file"> 240<parameter_description> input #GFile. 241</parameter_description> 242</parameter> 243<parameter name="display_name"> 244<parameter_description> a string. 245</parameter_description> 246</parameter> 247<parameter name="cancellable"> 248<parameter_description> Cancellable object. 249</parameter_description> 250</parameter> 251<parameter name="error"> 252<parameter_description> a #GError, or %NULL 253</parameter_description> 254</parameter> 255</parameters> 256<return> a #GFile specifying what @file was renamed to, or %NULL if there was an error. 257</return> 258</function> 259 260<function name="g_file_set_attribute_byte_string"> 261<description> 262Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value. 263If @attribute is of a different type, this operation will fail, 264returning %FALSE. 265 266The operation can be cancelled by 267triggering the cancellable object from another thread. If the operation 268was cancelled, a Gio::Error will be thrown with CANCELLED. 269 270 271</description> 272<parameters> 273<parameter name="file"> 274<parameter_description> input #GFile. 275</parameter_description> 276</parameter> 277<parameter name="attribute"> 278<parameter_description> a string containing the attribute's name. 279</parameter_description> 280</parameter> 281<parameter name="value"> 282<parameter_description> a string containing the attribute's new value. 283</parameter_description> 284</parameter> 285<parameter name="flags"> 286<parameter_description> a #GFileQueryInfoFlags. 287</parameter_description> 288</parameter> 289<parameter name="cancellable"> 290<parameter_description> Cancellable object. 291</parameter_description> 292</parameter> 293<parameter name="error"> 294<parameter_description> a #GError, or %NULL 295</parameter_description> 296</parameter> 297</parameters> 298<return> %TRUE if the @attribute was successfully set to @value 299in the @file, %FALSE otherwise. 300</return> 301</function> 302 303<function name="g_file_query_info"> 304<description> 305Gets the requested information about specified @file. The result 306is a #GFileInfo object that contains key-value attributes (such as 307the type or size of the file). 308 309The @attribute value is a string that specifies the file attributes that 310should be gathered. It is not an error if it's not possible to read a particular 311requested attribute from a file - it just won't be set. @attribute should 312be a comma-separated list of attribute or attribute wildcards. The wildcard "*" 313means all attributes, and a wildcard like "standard::*" means all attributes in the standard 314namespace. An example attribute query be "standard::*,owner::user". 315The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME. 316 317The operation can be cancelled by 318triggering the cancellable object from another thread. If the operation 319was cancelled, a Gio::Error will be thrown with CANCELLED. 320 321For symlinks, normally the information about the target of the 322symlink is returned, rather than information about the symlink itself. 323However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS in @flags the 324information about the symlink itself will be returned. Also, for symlinks 325that point to non-existing files the information about the symlink itself 326will be returned. 327 328If the file does not exist, a Gio::Error with NOT_FOUND will be thrown. 329Other errors are possible too, and depend on what kind of filesystem the file is on. 330 331 332</description> 333<parameters> 334<parameter name="file"> 335<parameter_description> input #GFile. 336</parameter_description> 337</parameter> 338<parameter name="attributes"> 339<parameter_description> an attribute query string. 340</parameter_description> 341</parameter> 342<parameter name="flags"> 343<parameter_description> a set of #GFileQueryInfoFlags. 344</parameter_description> 345</parameter> 346<parameter name="cancellable"> 347<parameter_description> Cancellable object. 348</parameter_description> 349</parameter> 350<parameter name="error"> 351<parameter_description> a #GError. 352</parameter_description> 353</parameter> 354</parameters> 355<return> a #GFileInfo for the given @file, or %NULL on error. 356</return> 357</function> 358 359<function name="g_input_stream_skip"> 360<description> 361Tries to skip @count bytes from the stream. Will block during the operation. 362 363This is identical to g_input_stream_read(), from a behaviour standpoint, 364but the bytes that are skipped are not returned to the user. Some 365streams have an implementation that is more efficient than reading the data. 366 367This function is optional for inherited classes, as the default implementation 368emulates it using read. 369 370The operation can be cancelled by 371triggering the cancellable object from another thread. If the operation 372was cancelled, a Gio::Error will be thrown with CANCELLED. If an 373operation was partially finished when the operation was cancelled the 374partial result will be returned, without an error. 375 376 377</description> 378<parameters> 379<parameter name="stream"> 380<parameter_description> a #GInputStream. 381</parameter_description> 382</parameter> 383<parameter name="count"> 384<parameter_description> the number of bytes that will be skipped from the stream 385</parameter_description> 386</parameter> 387<parameter name="cancellable"> 388<parameter_description> Cancellable object. 389</parameter_description> 390</parameter> 391<parameter name="error"> 392<parameter_description> location to store the error occuring, or %NULL to ignore 393</parameter_description> 394</parameter> 395</parameters> 396<return> Number of bytes skipped, or -1 on error 397</return> 398</function> 399 400<function name="g_file_make_directory"> 401<description> 402Creates a directory. 403 404The operation can be cancelled by 405triggering the cancellable object from another thread. If the operation 406was cancelled, a Gio::Error will be thrown with CANCELLED. 407 408 409</description> 410<parameters> 411<parameter name="file"> 412<parameter_description> input #GFile. 413</parameter_description> 414</parameter> 415<parameter name="cancellable"> 416<parameter_description> Cancellable object. 417</parameter_description> 418</parameter> 419<parameter name="error"> 420<parameter_description> a #GError, or %NULL 421</parameter_description> 422</parameter> 423</parameters> 424<return> %TRUE on successful creation, %FALSE otherwise. 425</return> 426</function> 427 428<function name="g_file_set_attribute_uint32"> 429<description> 430Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. 431If @attribute is of a different type, this operation will fail. 432 433The operation can be cancelled by 434triggering the cancellable object from another thread. If the operation 435was cancelled, a Gio::Error will be thrown with CANCELLED. 436 437 438</description> 439<parameters> 440<parameter name="file"> 441<parameter_description> input #GFile. 442</parameter_description> 443</parameter> 444<parameter name="attribute"> 445<parameter_description> a string containing the attribute's name. 446</parameter_description> 447</parameter> 448<parameter name="value"> 449<parameter_description> a #guint32 containing the attribute's new value. 450</parameter_description> 451</parameter> 452<parameter name="flags"> 453<parameter_description> a #GFileQueryInfoFlags. 454</parameter_description> 455</parameter> 456<parameter name="cancellable"> 457<parameter_description> Cancellable object. 458</parameter_description> 459</parameter> 460<parameter name="error"> 461<parameter_description> a #GError, or %NULL 462</parameter_description> 463</parameter> 464</parameters> 465<return> %TRUE if the @attribute was successfully set to @value 466in the @file, %FALSE otherwise. 467</return> 468</function> 469 470<function name="g_file_query_writable_namespaces"> 471<description> 472Obtain the list of attribute namespaces where new attributes 473can be created by a user. An example of this is extended 474attributes (in the "xattr" namespace). 475 476The operation can be cancelled by 477triggering the cancellable object from another thread. If the operation 478was cancelled, a Gio::Error will be thrown with CANCELLED. 479 480 481</description> 482<parameters> 483<parameter name="file"> 484<parameter_description> input #GFile. 485</parameter_description> 486</parameter> 487<parameter name="cancellable"> 488<parameter_description> Cancellable object. 489</parameter_description> 490</parameter> 491<parameter name="error"> 492<parameter_description> a #GError, or %NULL 493</parameter_description> 494</parameter> 495</parameters> 496<return> a #GFileAttributeInfoList describing the writable namespaces. 497When you are done with it, release it with g_file_attribute_info_list_unref() 498</return> 499</function> 500 501<function name="g_file_trash"> 502<description> 503Sends @file to the "Trashcan", if possible. This is similar to 504deleting it, but the user can recover it before emptying the trashcan. 505Not all file systems support trashing, so this call can throw a Gio::Error with 506 NOT_SUPPORTED. 507 508 509The operation can be cancelled by 510triggering the cancellable object from another thread. If the operation 511was cancelled, a Gio::Error will be thrown with CANCELLED. 512 513 514</description> 515<parameters> 516<parameter name="file"> 517<parameter_description> #GFile to send to trash. 518</parameter_description> 519</parameter> 520<parameter name="cancellable"> 521<parameter_description> Cancellable object. 522</parameter_description> 523</parameter> 524<parameter name="error"> 525<parameter_description> a #GError, or %NULL 526</parameter_description> 527</parameter> 528</parameters> 529<return> %TRUE on successful trash, %FALSE otherwise. 530</return> 531</function> 532 533<function name="g_file_set_attributes_from_info"> 534<description> 535Tries to set all attributes in the #GFileInfo on the target values, 536not stopping on the first error. 537 538If there is any error during this operation then @error will be set to 539the first error. Error on particular fields are flagged by setting 540the "status" field in the attribute value to 541%G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can also detect 542further errors. 543 544The operation can be cancelled by 545triggering the cancellable object from another thread. If the operation 546was cancelled, a Gio::Error will be thrown with CANCELLED. 547 548 549</description> 550<parameters> 551<parameter name="file"> 552<parameter_description> input #GFile. 553</parameter_description> 554</parameter> 555<parameter name="info"> 556<parameter_description> a #GFileInfo. 557</parameter_description> 558</parameter> 559<parameter name="flags"> 560<parameter_description> #GFileQueryInfoFlags 561</parameter_description> 562</parameter> 563<parameter name="cancellable"> 564<parameter_description> Cancellable object. 565</parameter_description> 566</parameter> 567<parameter name="error"> 568<parameter_description> a #GError, or %NULL 569</parameter_description> 570</parameter> 571</parameters> 572<return> %TRUE if there was any error, %FALSE otherwise. 573</return> 574</function> 575 576<function name="g_file_set_attribute_uint64"> 577<description> 578Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. 579If @attribute is of a different type, this operation will fail. 580 581The operation can be cancelled by 582triggering the cancellable object from another thread. If the operation 583was cancelled, a Gio::Error will be thrown with CANCELLED. 584 585 586</description> 587<parameters> 588<parameter name="file"> 589<parameter_description> input #GFile. 590</parameter_description> 591</parameter> 592<parameter name="attribute"> 593<parameter_description> a string containing the attribute's name. 594</parameter_description> 595</parameter> 596<parameter name="value"> 597<parameter_description> a #guint64 containing the attribute's new value. 598</parameter_description> 599</parameter> 600<parameter name="flags"> 601<parameter_description> a #GFileQueryInfoFlags. 602</parameter_description> 603</parameter> 604<parameter name="cancellable"> 605<parameter_description> Cancellable object. 606</parameter_description> 607</parameter> 608<parameter name="error"> 609<parameter_description> a #GError, or %NULL 610</parameter_description> 611</parameter> 612</parameters> 613<return> %TRUE if the @attribute was successfully set to @value 614in the @file, %FALSE otherwise. 615</return> 616</function> 617 618<function name="g_output_stream_flush"> 619<description> 620Flushed any outstanding buffers in the stream. Will block during 621the operation. Closing the stream will implicitly cause a flush. 622 623This function is optional for inherited classes. 624 625The operation can be cancelled by 626triggering the cancellable object from another thread. If the operation 627was cancelled, a Gio::Error will be thrown with CANCELLED. 628 629 630</description> 631<parameters> 632<parameter name="stream"> 633<parameter_description> a #GOutputStream. 634</parameter_description> 635</parameter> 636<parameter name="cancellable"> 637<parameter_description> Cancellable object. 638</parameter_description> 639</parameter> 640<parameter name="error"> 641<parameter_description> location to store the error occuring, or %NULL to ignore 642</parameter_description> 643</parameter> 644</parameters> 645<return> %TRUE on success, %FALSE on error 646</return> 647</function> 648 649 650<function name="g_seekable_truncate"> 651<description> 652Truncates a stream with a given #offset. 653 654The operation can be cancelled by 655triggering the cancellable object from another thread. If the operation 656was cancelled, a Gio::Error will be thrown with CANCELLED. If an 657operation was partially finished when the operation was cancelled the 658partial result will be returned, without an error. 659 660 661</description> 662<parameters> 663<parameter name="seekable"> 664<parameter_description> a #GSeekable. 665</parameter_description> 666</parameter> 667<parameter name="offset"> 668<parameter_description> a #goffset. 669</parameter_description> 670</parameter> 671<parameter name="cancellable"> 672<parameter_description> Cancellable object. 673</parameter_description> 674</parameter> 675<parameter name="error"> 676<parameter_description> a #GError location to store the error occuring, or %NULL to 677ignore. 678</parameter_description> 679</parameter> 680</parameters> 681<return> %TRUE if successful. If an error 682has occurred, this function will return %FALSE and set @error 683appropriately if present. 684</return> 685</function> 686 687<function name="g_buffered_input_stream_read_byte"> 688<description> 689Tries to read a single byte from the stream or the buffer. Will block 690during this read. 691 692On success, the byte read from the stream is returned. On end of stream 693-1 is returned but it's not an exceptional error and @error is not set. 694 695The operation can be cancelled by 696triggering the cancellable object from another thread. If the operation 697was cancelled, a Gio::Error will be thrown with CANCELLED. If an 698operation was partially finished when the operation was cancelled the 699partial result will be returned, without an error. 700 701 702 703 704</description> 705<parameters> 706<parameter name="stream"> 707<parameter_description> #GBufferedInputStream. 708</parameter_description> 709</parameter> 710<parameter name="cancellable"> 711<parameter_description> Cancellable object. 712</parameter_description> 713</parameter> 714<parameter name="error"> 715<parameter_description> location to store the error occuring, or %NULL to ignore. 716</parameter_description> 717</parameter> 718</parameters> 719<return> the byte read from the @stream, or -1 on end of stream or error. 720</return> 721</function> 722 723 724<function name="g_data_input_stream_read_uint64"> 725<description> 726Reads an unsigned 64-bit/8-byte value from @stream. 727 728In order to get the correct byte order for this read operation, 729see g_data_stream_get_byte_order(). 730 731The operation can be cancelled by 732triggering the cancellable object from another thread. If the operation 733was cancelled, a Gio::Error will be thrown with CANCELLED. 734 735 736</description> 737<parameters> 738<parameter name="stream"> 739<parameter_description> a given #GDataInputStream. 740</parameter_description> 741</parameter> 742<parameter name="cancellable"> 743<parameter_description> Cancellable object. 744</parameter_description> 745</parameter> 746<parameter name="error"> 747<parameter_description> #GError for error reporting. 748</parameter_description> 749</parameter> 750</parameters> 751<return> an unsigned 64-bit/8-byte read from @stream or %0 if 752an error occurred. 753</return> 754</function> 755 756<function name="g_file_output_stream_query_info"> 757<description> 758Queries a file output stream for the given @attributes. 759This function blocks while querying the stream. For the asynchronous 760version of this function, see g_file_output_stream_query_info_async(). 761While the stream is blocked, the stream will set the pending flag 762internally, and any other operations on the stream will fail with 763PENDING. 764 765Can fail if the stream was already closed (throwing a Gio::Error with 766CLOSED), the stream has pending operations (throwing a Gio::Error with 767PENDING), or if querying info is not supported for 768the stream's interface (throwing a Gio::Error with NOT_SUPPORTED). In 769all cases of failure, %NULL will be returned. 770 771The operation can be cancelled by 772triggering the cancellable object from another thread. If the operation 773was cancelled, a Gio::Error will be thrown with CANCELLED, and %NULL will 774be returned. 775 776 777</description> 778<parameters> 779<parameter name="stream"> 780<parameter_description> a #GFileOutputStream. 781</parameter_description> 782</parameter> 783<parameter name="attributes"> 784<parameter_description> a file attribute query string. 785</parameter_description> 786</parameter> 787<parameter name="cancellable"> 788<parameter_description> Cancellable object. 789</parameter_description> 790</parameter> 791<parameter name="error"> 792<parameter_description> a #GError, %NULL to ignore. 793</parameter_description> 794</parameter> 795</parameters> 796<return> a #GFileInfo for the @stream, or %NULL on error. 797</return> 798</function> 799 800 801<function name="g_file_set_attribute_int64"> 802<description> 803Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. 804If @attribute is of a different type, this operation will fail. 805 806The operation can be cancelled by 807triggering the cancellable object from another thread. If the operation 808was cancelled, a Gio::Error will be thrown with CANCELLED. 809 810 811</description> 812<parameters> 813<parameter name="file"> 814<parameter_description> input #GFile. 815</parameter_description> 816</parameter> 817<parameter name="attribute"> 818<parameter_description> a string containing the attribute's name. 819</parameter_description> 820</parameter> 821<parameter name="value"> 822<parameter_description> a #guint64 containing the attribute's new value. 823</parameter_description> 824</parameter> 825<parameter name="flags"> 826<parameter_description> a #GFileQueryInfoFlags. 827</parameter_description> 828</parameter> 829<parameter name="cancellable"> 830<parameter_description> Cancellable object. 831</parameter_description> 832</parameter> 833<parameter name="error"> 834<parameter_description> a #GError, or %NULL 835</parameter_description> 836</parameter> 837</parameters> 838<return> %TRUE if the @attribute was successfully set, %FALSE otherwise. 839</return> 840</function> 841 842<function name="g_file_find_enclosing_mount"> 843<description> 844Gets a #GMount for the #GFile. 845 846If the #GFileIface for @file does not have a mount (e.g. possibly a 847remote share), a Gio::Error will be thrown with NOT_FOUND and %NULL 848will be returned. 849 850The operation can be cancelled by 851triggering the cancellable object from another thread. If the operation 852was cancelled, a Gio::Error will be thrown with CANCELLED. 853 854 855</description> 856<parameters> 857<parameter name="file"> 858<parameter_description> input #GFile. 859</parameter_description> 860</parameter> 861<parameter name="cancellable"> 862<parameter_description> Cancellable object. 863</parameter_description> 864</parameter> 865<parameter name="error"> 866<parameter_description> a #GError. 867</parameter_description> 868</parameter> 869</parameters> 870<return> a #GMount where the @file is located or %NULL on error. 871</return> 872</function> 873 874<function name="g_data_input_stream_read_int64"> 875<description> 876Reads a 64-bit/8-byte value from @stream. 877 878In order to get the correct byte order for this read operation, 879see g_data_stream_get_byte_order() and g_data_stream_set_byte_order(). 880 881The operation can be cancelled by 882triggering the cancellable object from another thread. If the operation 883was cancelled, a Gio::Error will be thrown with CANCELLED. 884 885 886</description> 887<parameters> 888<parameter name="stream"> 889<parameter_description> a given #GDataInputStream. 890</parameter_description> 891</parameter> 892<parameter name="cancellable"> 893<parameter_description> Cancellable object. 894</parameter_description> 895</parameter> 896<parameter name="error"> 897<parameter_description> #GError for error reporting. 898</parameter_description> 899</parameter> 900</parameters> 901<return> a signed 64-bit/8-byte value read from @stream or %0 if 902an error occurred. 903</return> 904</function> 905 906<function name="g_buffered_input_stream_fill"> 907<description> 908Tries to read @count bytes from the stream into the buffer. 909Will block during this read. 910 911If @count is zero, returns zero and does nothing. A value of @count 912larger than %G_MAXSSIZE will cause a Gio::Error to be thrown, with INVALID_ARGUMENT. 913 914On success, the number of bytes read into the buffer is returned. 915It is not an error if this is not the same as the requested size, as it 916can happen e.g. near the end of a file. Zero is returned on end of file 917(or if @count is zero), but never otherwise. 918 919The operation can be cancelled by 920triggering the cancellable object from another thread. If the operation 921was cancelled, a Gio::Error will be thrown with CANCELLED. If an 922operation was partially finished when the operation was cancelled the 923partial result will be returned, without an error. 924 925 926 927For the asynchronous, non-blocking, version of this function, see 928g_buffered_input_stream_fill_async(). 929 930 931</description> 932<parameters> 933<parameter name="stream"> 934<parameter_description> #GBufferedInputStream. 935</parameter_description> 936</parameter> 937<parameter name="count"> 938<parameter_description> the number of bytes that will be read from the stream. 939</parameter_description> 940</parameter> 941<parameter name="cancellable"> 942<parameter_description> Cancellable object. 943</parameter_description> 944</parameter> 945<parameter name="error"> 946<parameter_description> location to store the error occuring, or %NULL to ignore. 947</parameter_description> 948</parameter> 949</parameters> 950<return> the number of bytes read into @stream's buffer, up to @count, 951or -1 on error. 952</return> 953</function> 954 955<function name="g_data_input_stream_read_int32"> 956<description> 957Reads a signed 32-bit/4-byte value from @stream. 958 959In order to get the correct byte order for this read operation, 960see g_data_stream_get_byte_order() and g_data_stream_set_byte_order(). 961 962The operation can be cancelled by 963triggering the cancellable object from another thread. If the operation 964was cancelled, a Gio::Error will be thrown with CANCELLED. 965 966 967</description> 968<parameters> 969<parameter name="stream"> 970<parameter_description> a given #GDataInputStream. 971</parameter_description> 972</parameter> 973<parameter name="cancellable"> 974<parameter_description> Cancellable object. 975</parameter_description> 976</parameter> 977<parameter name="error"> 978<parameter_description> #GError for error reporting. 979</parameter_description> 980</parameter> 981</parameters> 982<return> a signed 32-bit/4-byte value read from the @stream or %0 if 983an error occurred. 984</return> 985</function> 986 987 988<function name="g_file_set_attribute_string"> 989<description> 990Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. 991If @attribute is of a different type, this operation will fail. 992 993The operation can be cancelled by 994triggering the cancellable object from another thread. If the operation 995was cancelled, a Gio::Error will be thrown with CANCELLED. 996 997 998</description> 999<parameters> 1000<parameter name="file"> 1001<parameter_description> input #GFile. 1002</parameter_description> 1003</parameter> 1004<parameter name="attribute"> 1005<parameter_description> a string containing the attribute's name. 1006</parameter_description> 1007</parameter> 1008<parameter name="value"> 1009<parameter_description> a string containing the attribute's value. 1010</parameter_description> 1011</parameter> 1012<parameter name="flags"> 1013<parameter_description> #GFileQueryInfoFlags. 1014</parameter_description> 1015</parameter> 1016<parameter name="cancellable"> 1017<parameter_description> Cancellable object. 1018</parameter_description> 1019</parameter> 1020<parameter name="error"> 1021<parameter_description> a #GError, or %NULL 1022</parameter_description> 1023</parameter> 1024</parameters> 1025<return> %TRUE if the @attribute was successfully set, %FALSE otherwise. 1026</return> 1027</function> 1028 1029 1030<function name="g_file_create"> 1031<description> 1032Creates a new file and returns an output stream for writing to it. 1033The file must not already exists. 1034 1035By default files created are generally readable by everyone, 1036but if you pass #G_FILE_CREATE_PRIVATE in @flags the file 1037will be made readable only to the current user, to the level that 1038is supported on the target filesystem. 1039 1040The operation can be cancelled by 1041triggering the cancellable object from another thread. If the operation 1042was cancelled, a Gio::Error will be thrown with CANCELLED. 1043 1044If a file or directory with this name already exists a Gio::Error with EXISTS 1045will be thrown. 1046Some file systems don't allow all file names, and may 1047throw a Gio::Error with INVALID_FILENAME, and if the name 1048is to long a Gio::Error with FILENAME_TOO_LONG will be thrown. 1049Other errors are possible too, and depend on what kind of 1050filesystem the file is on. 1051 1052 1053</description> 1054<parameters> 1055<parameter name="file"> 1056<parameter_description> input #GFile. 1057</parameter_description> 1058</parameter> 1059<parameter name="flags"> 1060<parameter_description> a set of #GFileCreateFlags. 1061</parameter_description> 1062</parameter> 1063<parameter name="cancellable"> 1064<parameter_description> Cancellable object. 1065</parameter_description> 1066</parameter> 1067<parameter name="error"> 1068<parameter_description> a #GError, or %NULL 1069</parameter_description> 1070</parameter> 1071</parameters> 1072<return> a #GFileOutputStream for the newly created file, or 1073%NULL on error. 1074</return> 1075</function> 1076 1077<function name="g_file_load_contents"> 1078<description> 1079Loads the content of the file into memory, returning the size of 1080the data. The data is always zero terminated, but this is not 1081included in the resultant @length. 1082 1083The operation can be cancelled by 1084triggering the cancellable object from another thread. If the operation 1085was cancelled, a Gio::Error will be thrown with CANCELLED. 1086 1087 1088</description> 1089<parameters> 1090<parameter name="file"> 1091<parameter_description> input #GFile. 1092</parameter_description> 1093</parameter> 1094<parameter name="cancellable"> 1095<parameter_description> Cancellable object. 1096</parameter_description> 1097</parameter> 1098<parameter name="contents"> 1099<parameter_description> a location to place the contents of the file. 1100</parameter_description> 1101</parameter> 1102<parameter name="length"> 1103<parameter_description> a location to place the length of the contents of the file. 1104</parameter_description> 1105</parameter> 1106<parameter name="etag_out"> 1107<parameter_description> a location to place the current entity tag for the file. 1108</parameter_description> 1109</parameter> 1110<parameter name="error"> 1111<parameter_description> a #GError, or %NULL 1112</parameter_description> 1113</parameter> 1114</parameters> 1115<return> %TRUE if the @file's contents were successfully loaded. 1116%FALSE if there were errors.. 1117</return> 1118</function> 1119 1120<function name="g_output_stream_close"> 1121<description> 1122Closes the stream, releasing resources related to it. 1123 1124Once the stream is closed, all other operations will throw a Gio::Error with 1125CLOSED. Closing a stream multiple times will not cause an error to be 1126thrown. 1127 1128Closing a stream will automatically flush any outstanding buffers in the 1129stream. 1130 1131Streams will be automatically closed when the last reference 1132is dropped, but you might want to call this function to make sure 1133resources are released as early as possible. 1134 1135Some streams might keep the backing store of the stream (e.g. a file descriptor) 1136open after the stream is closed. See the documentation for the individual 1137stream for details. 1138 1139On failure the first error that happened will be reported, but the close 1140operation will finish as much as possible. A stream that failed to 1141close will still throw a Gio::Error with CLOSED for all operations. Still, it 1142is important to check and report the error to the user, otherwise 1143there might be a loss of data as all data might not be written. 1144 1145The operation can be cancelled by 1146triggering the cancellable object from another thread. If the operation 1147was cancelled, a Gio::Error will be thrown with CANCELLED. 1148Cancelling a close will still leave the stream closed, but there some streams 1149can use a faster close that doesn't block to e.g. check errors. On 1150cancellation (as with any error) there is no guarantee that all written 1151data will reach the target. 1152 1153 1154</description> 1155<parameters> 1156<parameter name="stream"> 1157<parameter_description> A #GOutputStream. 1158</parameter_description> 1159</parameter> 1160<parameter name="cancellable"> 1161<parameter_description> Cancellable object. 1162</parameter_description> 1163</parameter> 1164<parameter name="error"> 1165<parameter_description> location to store the error occuring, or %NULL to ignore 1166</parameter_description> 1167</parameter> 1168</parameters> 1169<return> %TRUE on success, %FALSE on failure 1170</return> 1171</function> 1172 1173<function name="g_file_replace_contents"> 1174<description> 1175Replaces the contents of @file with @contents of @length bytes. 1176 1177If @etag is specified any existing file must have that etag, or 1178a Gio::Errrow with WRONG_ETAG will be thrown. 1179 1180If @make_backup is %TRUE, this function will attempt to make a backup of @file. 1181 1182The operation can be cancelled by 1183triggering the cancellable object from another thread. If the operation 1184was cancelled, a Gio::Error will be thrown with CANCELLED. 1185 1186The returned @new_etag can be used to verify that the file hasn't changed the 1187next time it is saved over. 1188 1189 1190</description> 1191<parameters> 1192<parameter name="file"> 1193<parameter_description> input #GFile. 1194</parameter_description> 1195</parameter> 1196<parameter name="contents"> 1197<parameter_description> a string containing the new contents for @file. 1198</parameter_description> 1199</parameter> 1200<parameter name="length"> 1201<parameter_description> the length of @contents in bytes. 1202</parameter_description> 1203</parameter> 1204<parameter name="etag"> 1205<parameter_description> the old &lt;link linkend="gfile-etag"&gt;entity tag&lt;/link&gt; 1206for the document. 1207</parameter_description> 1208</parameter> 1209<parameter name="make_backup"> 1210<parameter_description> %TRUE if a backup should be created. 1211</parameter_description> 1212</parameter> 1213<parameter name="flags"> 1214<parameter_description> a set of #GFileCreateFlags. 1215</parameter_description> 1216</parameter> 1217<parameter name="new_etag"> 1218<parameter_description> a location to a new &lt;link linkend="gfile-etag"&gt;entity tag&lt;/link&gt; 1219for the document. This should be freed with g_free() when no longer 1220needed. 1221</parameter_description> 1222</parameter> 1223<parameter name="cancellable"> 1224<parameter_description> Cancellable object. 1225</parameter_description> 1226</parameter> 1227<parameter name="error"> 1228<parameter_description> a #GError, or %NULL 1229</parameter_description> 1230</parameter> 1231</parameters> 1232<return> %TRUE if successful. If an error 1233has occurred, this function will return %FALSE and set @error 1234appropriately if present. 1235 1236 1237</return> 1238</function> 1239 1240<function name="g_data_input_stream_read_line"> 1241<description> 1242Reads a line from the data input stream. 1243 1244The operation can be cancelled by 1245triggering the cancellable object from another thread. If the operation 1246was cancelled, a Gio::Error will be thrown with CANCELLED. 1247 1248 1249</description> 1250<parameters> 1251<parameter name="stream"> 1252<parameter_description> a given #GDataInputStream. 1253</parameter_description> 1254</parameter> 1255<parameter name="length"> 1256<parameter_description> a #gsize to get the length of the data read in. 1257</parameter_description> 1258</parameter> 1259<parameter name="cancellable"> 1260<parameter_description> Cancellable object. 1261</parameter_description> 1262</parameter> 1263<parameter name="error"> 1264<parameter_description> #GError for error reporting. 1265</parameter_description> 1266</parameter> 1267</parameters> 1268<return> a string with the line that was read in (including the newlines). 1269Set @length to a #gsize to get the length of the read line. Returns %NULL on an error. 1270</return> 1271</function> 1272 1273 1274<function name="g_input_stream_read"> 1275<description> 1276Tries to read @count bytes from the stream into the buffer starting at 1277@buffer. Will block during this read. 1278 1279If count is zero returns zero and does nothing. A value of @count 1280larger than %G_MAXSSIZE will cause a Gio::Error with INVALID_ARGUMENT to be thrown. 1281 1282On success, the number of bytes read into the buffer is returned. 1283It is not an error if this is not the same as the requested size, as it 1284can happen e.g. near the end of a file. Zero is returned on end of file 1285(or if @count is zero), but never otherwise. 1286 1287The operation can be cancelled by 1288triggering the cancellable object from another thread. If the operation 1289was cancelled, a Gio::Error will be thrown with CANCELLED. If an 1290operation was partially finished when the operation was cancelled the 1291partial result will be returned, without an error. 1292 1293</description> 1294<parameters> 1295<parameter name="stream"> 1296<parameter_description> a #GInputStream. 1297</parameter_description> 1298</parameter> 1299<parameter name="buffer"> 1300<parameter_description> a buffer to read data into (which should be at least count bytes long). 1301</parameter_description> 1302</parameter> 1303<parameter name="count"> 1304<parameter_description> the number of bytes that will be read from the stream 1305</parameter_description> 1306</parameter> 1307<parameter name="cancellable"> 1308<parameter_description> Cancellable object. 1309</parameter_description> 1310</parameter> 1311<parameter name="error"> 1312<parameter_description> location to store the error occuring, or %NULL to ignore 1313</parameter_description> 1314</parameter> 1315</parameters> 1316<return> Number of bytes read, or -1 on error 1317</return> 1318</function> 1319 1320<function name="g_file_enumerate_children"> 1321<description> 1322Gets the requested information about the files in a directory. The result 1323is a #GFileEnumerator object that will give out #GFileInfo objects for 1324all the files in the directory. 1325 1326The @attribute value is a string that specifies the file attributes that 1327should be gathered. It is not an error if it's not possible to read a particular 1328requested attribute from a file - it just won't be set. @attribute should 1329be a comma-separated list of attribute or attribute wildcards. The wildcard "*" 1330means all attributes, and a wildcard like "standard::*" means all attributes in the standard 1331namespace. An example attribute query be "standard::*,owner::user". 1332The standard attributes are available as defines, like #G_FILE_ATTRIBUTE_STANDARD_NAME. 1333 1334The operation can be cancelled by 1335triggering the cancellable object from another thread. If the operation 1336was cancelled, a Gio::Error will be thrown with CANCELLED. 1337 1338If the file does not exist, a Gio::Error with NOT_FOUND will be thrown. 1339If the file is not a directory, a Glib::FileError with NOTDIR will be returned. 1340Other errors are possible too. 1341 1342 1343</description> 1344<parameters> 1345<parameter name="file"> 1346<parameter_description> input #GFile. 1347</parameter_description> 1348</parameter> 1349<parameter name="attributes"> 1350<parameter_description> an attribute query string. 1351</parameter_description> 1352</parameter> 1353<parameter name="flags"> 1354<parameter_description> a set of #GFileQueryInfoFlags. 1355</parameter_description> 1356</parameter> 1357<parameter name="cancellable"> 1358<parameter_description> Cancellable object. 1359</parameter_description> 1360</parameter> 1361<parameter name="error"> 1362<parameter_description> #GError for error reporting. 1363</parameter_description> 1364</parameter> 1365</parameters> 1366<return> A #GFileEnumerator if successful, %NULL on error. 1367</return> 1368</function> 1369 1370<function name="g_data_input_stream_read_uint32"> 1371<description> 1372Reads an unsigned 32-bit/4-byte value from @stream. 1373 1374In order to get the correct byte order for this read operation, 1375see g_data_stream_get_byte_order() and g_data_stream_set_byte_order(). 1376 1377The operation can be cancelled by 1378triggering the cancellable object from another thread. If the operation 1379was cancelled, a Gio::Error will be thrown with CANCELLED. 1380 1381 1382</description> 1383<parameters> 1384<parameter name="stream"> 1385<parameter_description> a given #GDataInputStream. 1386</parameter_description> 1387</parameter> 1388<parameter name="cancellable"> 1389<parameter_description> Cancellable object. 1390</parameter_description> 1391</parameter> 1392<parameter name="error"> 1393<parameter_description> #GError for error reporting. 1394</parameter_description> 1395</parameter> 1396</parameters> 1397<return> an unsigned 32-bit/4-byte value read from the @stream or %0 if 1398an error occurred. 1399</return> 1400</function> 1401 1402<function name="g_input_stream_close"> 1403<description> 1404Closes the stream, releasing resources related to it. 1405 1406Once the stream is closed, all other operations will throw a Gio::Error with CLOSED. 1407Closing a stream multiple times will not return an error. 1408 1409Streams will be automatically closed when the last reference 1410is dropped, but you might want to call this function to make sure 1411resources are released as early as possible. 1412 1413Some streams might keep the backing store of the stream (e.g. a file descriptor) 1414open after the stream is closed. See the documentation for the individual 1415stream for details. 1416 1417On failure the first error that happened will be reported, but the close 1418operation will finish as much as possible. A stream that failed to 1419close will still throw a Gio::Error with CLOSED for all operations. Still, it 1420is important to check and report the error to the user. 1421 1422The operation can be cancelled by 1423triggering the cancellable object from another thread. If the operation 1424was cancelled, a Gio::Error will be thrown with CANCELLED. 1425Cancelling a close will still leave the stream closed, but some streams 1426can use a faster close that doesn't block to e.g. check errors. 1427 1428 1429</description> 1430<parameters> 1431<parameter name="stream"> 1432<parameter_description> A #GInputStream. 1433</parameter_description> 1434</parameter> 1435<parameter name="cancellable"> 1436<parameter_description> Cancellable object. 1437</parameter_description> 1438</parameter> 1439<parameter name="error"> 1440<parameter_description> location to store the error occuring, or %NULL to ignore 1441</parameter_description> 1442</parameter> 1443</parameters> 1444<return> %TRUE on success, %FALSE on failure 1445</return> 1446</function> 1447 1448 1449<function name="g_file_query_filesystem_info"> 1450<description> 1451Similar to g_file_query_info(), but obtains information 1452about the filesystem the @file is on, rather than the file itself. 1453For instance the amount of space available and the type of 1454the filesystem. 1455 1456The @attribute value is a string that specifies the file attributes that 1457should be gathered. It is not an error if it's not possible to read a particular 1458requested attribute from a file - it just won't be set. @attribute should 1459be a comma-separated list of attribute or attribute wildcards. The wildcard "*" 1460means all attributes, and a wildcard like "fs:*" means all attributes in the fs 1461namespace. The standard namespace for filesystem attributes is "fs". 1462Common attributes of interest are #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE 1463(the total size of the filesystem in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of 1464bytes available), and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). 1465 1466The operation can be cancelled by 1467triggering the cancellable object from another thread. If the operation 1468was cancelled, a Gio::Error will be thrown with CANCELLED. 1469 1470If the file does not exist, a Gio::Error with NOT_FOUND will be thrown. 1471Other errors are possible too, and depend on what kind of filesystem the file is on. 1472 1473 1474</description> 1475<parameters> 1476<parameter name="file"> 1477<parameter_description> input #GFile. 1478</parameter_description> 1479</parameter> 1480<parameter name="attributes"> 1481<parameter_description> an attribute query string. 1482</parameter_description> 1483</parameter> 1484<parameter name="cancellable"> 1485<parameter_description> Cancellable object. 1486</parameter_description> 1487</parameter> 1488<parameter name="error"> 1489<parameter_description> a #GError. 1490</parameter_description> 1491</parameter> 1492</parameters> 1493<return> a #GFileInfo or %NULL if there was an error. 1494</return> 1495</function> 1496 1497<function name="g_output_stream_write"> 1498<description> 1499Tries to write @count bytes from @buffer into the stream. Will block 1500during the operation. 1501 1502If count is zero returns zero and does nothing. A value of @count 1503larger than %G_MAXSSIZE will cause a Gio::Error with INVALID_ARGUMENT to be thrown. 1504 1505On success, the number of bytes written to the stream is returned. 1506It is not an error if this is not the same as the requested size, as it 1507can happen e.g. on a partial i/o error, or if there is not enough 1508storage in the stream. All writes either block until at least one byte 1509is written, so zero is never returned (unless @count is zero). 1510 1511The operation can be cancelled by 1512triggering the cancellable object from another thread. If the operation 1513was cancelled, a Gio::Error will be thrown with CANCELLED. If an 1514operation was partially finished when the operation was cancelled the 1515partial result will be returned, without an error. 1516 1517 1518 1519 1520</description> 1521<parameters> 1522<parameter name="stream"> 1523<parameter_description> a #GOutputStream. 1524</parameter_description> 1525</parameter> 1526<parameter name="buffer"> 1527<parameter_description> the buffer containing the data to write. 1528</parameter_description> 1529</parameter> 1530<parameter name="count"> 1531<parameter_description> the number of bytes to write 1532</parameter_description> 1533</parameter> 1534<parameter name="cancellable"> 1535<parameter_description> Cancellable object. 1536</parameter_description> 1537</parameter> 1538<parameter name="error"> 1539<parameter_description> location to store the error occuring, or %NULL to ignore 1540</parameter_description> 1541</parameter> 1542</parameters> 1543<return> Number of bytes written, or -1 on error 1544</return> 1545</function> 1546 1547<function name="g_file_monitor_file"> 1548<description> 1549Obtains a file monitor for the given file. If no file notification 1550mechanism exists, then regular polling of the file is used. 1551 1552The operation can be cancelled by 1553triggering the cancellable object from another thread. If the operation 1554was cancelled, a Gio::Error will be thrown with CANCELLED. 1555 1556 1557</description> 1558<parameters> 1559<parameter name="file"> 1560<parameter_description> input #GFile. 1561</parameter_description> 1562</parameter> 1563<parameter name="flags"> 1564<parameter_description> a set of #GFileMonitorFlags. 1565</parameter_description> 1566</parameter> 1567<parameter name="cancellable"> 1568<parameter_description> Cancellable object. 1569</parameter_description> 1570</parameter> 1571<parameter name="error"> 1572<parameter_description> a #GError, or %NULL. 1573</parameter_description> 1574</parameter> 1575</parameters> 1576<return> a #GFileMonitor for the given @file. 1577</return> 1578</function> 1579 1580<function name="g_file_set_attribute"> 1581<description> 1582Sets an attribute in the file with attribute name @attribute to @value. 1583 1584The operation can be cancelled by 1585triggering the cancellable object from another thread. If the operation 1586was cancelled, a Gio::Error will be thrown with CANCELLED. 1587 1588 1589</description> 1590<parameters> 1591<parameter name="file"> 1592<parameter_description> input #GFile. 1593</parameter_description> 1594</parameter> 1595<parameter name="attribute"> 1596<parameter_description> a string containing the attribute's name. 1597</parameter_description> 1598</parameter> 1599<parameter name="type"> 1600<parameter_description> The type of the attribute 1601</parameter_description> 1602</parameter> 1603<parameter name="value_p"> 1604<parameter_description> a pointer to the value (or the pointer itself if the type is a pointer type) 1605</parameter_description> 1606</parameter> 1607<parameter name="flags"> 1608<parameter_description> a set of #GFileQueryInfoFlags. 1609</parameter_description> 1610</parameter> 1611<parameter name="cancellable"> 1612<parameter_description> Cancellable object. 1613</parameter_description> 1614</parameter> 1615<parameter name="error"> 1616<parameter_description> a #GError, or %NULL 1617</parameter_description> 1618</parameter> 1619</parameters> 1620<return> %TRUE if the attribute was set, %FALSE otherwise. 1621</return> 1622</function> 1623 1624<function name="g_file_read"> 1625<description> 1626Opens a file for reading. The result is a #GFileInputStream that 1627can be used to read the contents of the file. 1628 1629The operation can be cancelled by 1630triggering the cancellable object from another thread. If the operation 1631was cancelled, a Gio::Error will be thrown with CANCELLED. 1632 1633If the file does not exist, a Gio::Error with NOT_FOUND will be thrown. 1634If the file is a directory, a Gio::Error with IS_DIRECTORY will be thrown. 1635Other errors are possible too, and depend on what kind of filesystem the file is on. 1636 1637 1638</description> 1639<parameters> 1640<parameter name="file"> 1641<parameter_description> #GFile to read. 1642</parameter_description> 1643</parameter> 1644<parameter name="cancellable"> 1645<parameter_description> a #GCancellable 1646</parameter_description> 1647</parameter> 1648<parameter name="error"> 1649<parameter_description> a #GError, or %NULL 1650</parameter_description> 1651</parameter> 1652</parameters> 1653<return> #GFileInputStream or %NULL on error. 1654</return> 1655</function> 1656 1657<function name="g_file_monitor_directory"> 1658<description> 1659Obtains a directory monitor for the given file. 1660This may fail if directory monitoring is not supported. 1661 1662The operation can be cancelled by 1663triggering the cancellable object from another thread. If the operation 1664was cancelled, a Gio::Error will be thrown with CANCELLED. 1665 1666 1667</description> 1668<parameters> 1669<parameter name="file"> 1670<parameter_description> input #GFile. 1671</parameter_description> 1672</parameter> 1673<parameter name="flags"> 1674<parameter_description> a set of #GFileMonitorFlags. 1675</parameter_description> 1676</parameter> 1677<parameter name="cancellable"> 1678<parameter_description> Cancellable object. 1679</parameter_description> 1680</parameter> 1681<parameter name="error"> 1682<parameter_description> a #GError, or %NULL. 1683</parameter_description> 1684</parameter> 1685</parameters> 1686<return> a #GFileMonitor for the given @file, 1687or %NULL on error. 1688</return> 1689</function> 1690 1691<function name="g_file_query_exists"> 1692<description> 1693Utility function to check if a particular file exists. This is 1694implemented using query_info() and as such does blocking I/O. 1695 1696Note that in many cases it is racy to first check for file existence 1697and then execute something based on the outcome of that, because the 1698file might have been created or removed in between the operations. The 1699general approach to handling that is to not check, but just do the 1700operation and handle the errors as they come. 1701 1702As an example of race-free checking, take the case of reading a file, and 1703if it doesn't exist, creating it. There are two racy versions: read it, and 1704on error create it; and: check if it exists, if not create it. These 1705can both result in two processes creating the file (with perhaps a partially 1706written file as the result). The correct approach is to always try to create 1707the file with File::create() which will either atomically create the file 1708or fail with a Gio::Error exception with EXISTS. 1709 1710However, in many cases an existence check is useful in a user 1711interface, for instance to make a menu item sensitive/insensitive, so that 1712you don't have to fool users that something is possible and then just show 1713and error dialog. If you do this, you should make sure to also handle the 1714errors that can happen due to races when you execute the operation. 1715 1716 1717</description> 1718<parameters> 1719<parameter name="file"> 1720<parameter_description> input #GFile. 1721</parameter_description> 1722</parameter> 1723<parameter name="cancellable"> 1724<parameter_description> optional #GCancellable object, %NULL to ignore. 1725</parameter_description> 1726</parameter> 1727</parameters> 1728<return> %TRUE if the file exists (and can be detected without error), %FALSE otherwise (or if cancelled). 1729</return> 1730</function> 1731 1732<function name="g_dbus_proxy_call"> 1733<parameters> 1734<parameter name="proxy"> 1735<parameter_description> A #GDBusProxy. 1736</parameter_description> 1737</parameter> 1738<parameter name="method_name"> 1739<parameter_description> Name of method to invoke. 1740</parameter_description> 1741</parameter> 1742<parameter name="parameters"> 1743<parameter_description> A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. 1744</parameter_description> 1745</parameter> 1746<parameter name="flags"> 1747<parameter_description> Flags from the #GDBusCallFlags enumeration. 1748</parameter_description> 1749</parameter> 1750<parameter name="timeout_msec"> 1751<parameter_description> The timeout in milliseconds (with %G_MAXINT meaning 1752"infinite") or -1 to use the proxy default timeout. 1753</parameter_description> 1754</parameter> 1755<parameter name="cancellable"> 1756<parameter_description> A #GCancellable or %NULL. 1757</parameter_description> 1758</parameter> 1759<parameter name="callback"> 1760<parameter_description> A #GAsyncReadyCallback to call when the request is satisfied. Use another overload 1761without this parameter if your don't care about the result of the method invocation. 1762</parameter_description> 1763</parameter> 1764<parameter name="user_data"> 1765<parameter_description> The data to pass to @callback. 1766</parameter_description> 1767</parameter> 1768</parameters> 1769</function> 1770 1771<function name="g_dbus_proxy_call_with_unix_fd_list"> 1772<parameters> 1773<parameter name="proxy"> 1774<parameter_description> A #GDBusProxy. 1775</parameter_description> 1776</parameter> 1777<parameter name="method_name"> 1778<parameter_description> Name of method to invoke. 1779</parameter_description> 1780</parameter> 1781<parameter name="parameters"> 1782<parameter_description> A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. 1783</parameter_description> 1784</parameter> 1785<parameter name="flags"> 1786<parameter_description> Flags from the #GDBusCallFlags enumeration. 1787</parameter_description> 1788</parameter> 1789<parameter name="timeout_msec"> 1790<parameter_description> The timeout in milliseconds (with %G_MAXINT meaning 1791"infinite") or -1 to use the proxy default timeout. 1792</parameter_description> 1793</parameter> 1794<parameter name="fd_list"> 1795<parameter_description> A #GUnixFDList or %NULL. 1796</parameter_description> 1797</parameter> 1798<parameter name="cancellable"> 1799<parameter_description> A #GCancellable or %NULL. 1800</parameter_description> 1801</parameter> 1802<parameter name="callback"> 1803<parameter_description> A #GAsyncReadyCallback to call when the request is satisfied. Use another overload 1804without this parameter if your don't care about the result of the method invocation. 1805</parameter_description> 1806</parameter> 1807<parameter name="user_data"> 1808<parameter_description> The data to pass to @callback. 1809</parameter_description> 1810</parameter> 1811</parameters> 1812</function> 1813 1814</root> 1815