re17.html 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <title>&lt;%GLibFileSetContentsFlags&gt;: </title>
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
  7. <link rel="home" href="index.html" title="">
  8. <link rel="up" href="ch01.html" title="GLib">
  9. <link rel="prev" href="re16.html" title="&lt;%GLibFileError&gt;">
  10. <link rel="next" href="re18.html" title="&lt;%GLibFileTest&gt;">
  11. <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
  12. <link rel="stylesheet" href="style.css" type="text/css">
  13. </head>
  14. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  15. <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
  16. <td width="100%" align="left" class="shortcuts"></td>
  17. <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
  18. <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
  19. <td><a accesskey="p" href="re16.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
  20. <td><a accesskey="n" href="re18.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
  21. </tr></table>
  22. <div class="refentry">
  23. <a name="id-1.1.18"></a><div class="titlepage"></div>
  24. <div class="refnamediv">
  25. <h2>&lt;%GLibFileSetContentsFlags&gt;</h2>
  26. <p>&lt;%GLibFileSetContentsFlags&gt;</p>
  27. </div>
  28. <div class="refsect1">
  29. <a name="id-1.1.18.2"></a><h2>Description</h2>
  30. <p>Flags to pass to <code class="function">g_file_set_contents_full()</code> to affect its safety and
  31. performance.</p>
  32. </div>
  33. <div class="refsect1">
  34. <a name="id-1.1.18.3"></a><h2>Members</h2>
  35. <div class="refsect2">
  36. <a name="id-1.1.18.3.2"></a><h3>none</h3>
  37. <p class="remark"><em><span class="remark">alias <code class="code">G_FILE_SET_CONTENTS_NONE</code></span></em></p>
  38. <p>No guarantees about file consistency or durability.
  39. The most dangerous setting, which is slightly faster than other settings.</p>
  40. </div>
  41. <div class="refsect2">
  42. <a name="id-1.1.18.3.3"></a><h3>consistent</h3>
  43. <p class="remark"><em><span class="remark">alias <code class="code">G_FILE_SET_CONTENTS_CONSISTENT</code></span></em></p>
  44. <p>Guarantee file consistency: after a crash,
  45. either the old version of the file or the new version of the file will be
  46. available, but not a mixture. On Unix systems this equates to an <code class="code">fsync()</code>
  47. on the file and use of an atomic <code class="code">rename()</code> of the new version of the file
  48. over the old.</p>
  49. </div>
  50. <div class="refsect2">
  51. <a name="id-1.1.18.3.4"></a><h3>durable</h3>
  52. <p class="remark"><em><span class="remark">alias <code class="code">G_FILE_SET_CONTENTS_DURABLE</code></span></em></p>
  53. <p>Guarantee file durability: after a crash, the
  54. new version of the file will be available. On Unix systems this equates to
  55. an <code class="code">fsync()</code> on the file (if <code class="constant">G_FILE_SET_CONTENTS_CONSISTENT</code> is unset), or
  56. the effects of <code class="constant">G_FILE_SET_CONTENTS_CONSISTENT</code> plus an <code class="code">fsync()</code> on the
  57. directory containing the file after calling <code class="code">rename()</code>.</p>
  58. </div>
  59. <div class="refsect2">
  60. <a name="id-1.1.18.3.5"></a><h3>only-existing</h3>
  61. <p class="remark"><em><span class="remark">alias <code class="code">G_FILE_SET_CONTENTS_ONLY_EXISTING</code></span></em></p>
  62. <p>Only apply consistency and durability
  63. guarantees if the file already exists. This may speed up file operations
  64. if the file doesn’t currently exist, but may result in a corrupted version
  65. of the new file if the system crashes while writing it.</p>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="footer">
  70. <hr>Generated by GTK-Doc V1.33.1</div>
  71. </body>
  72. </html>