v3.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <html>
  2. <head>
  3. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  4. <meta name="ProgId" content="FrontPage.Editor.Document">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>Filesystem V3 Intro</title>
  7. <link href="styles.css" rel="stylesheet">
  8. <body>
  9. <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
  10. <tr>
  11. <td width="277">
  12. <a href="../../../index.htm">
  13. <img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="300" height="86" border="0"></a></td>
  14. <td align="middle">
  15. <font size="7">Filesystem
  16. Version 3<br>
  17. Introduction</font></td>
  18. </tr>
  19. </table>
  20. <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse"
  21. bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
  22. <tr>
  23. <td><a href="index.htm">Home</a> &nbsp;&nbsp;
  24. <a href="tutorial.html">Tutorial</a> &nbsp;&nbsp;
  25. <a href="reference.html">Reference</a> &nbsp;&nbsp;
  26. <a href="faq.htm">FAQ</a> &nbsp;&nbsp;
  27. <a href="release_history.html">Releases</a> &nbsp;&nbsp;
  28. <a href="portability_guide.htm">Portability</a> &nbsp;&nbsp;
  29. <a href="v3.html">V3 Intro</a> &nbsp;&nbsp;
  30. <a href="v3_design.html">V3 Design</a> &nbsp;&nbsp;
  31. <a href="deprecated.html">Deprecated</a> &nbsp;&nbsp;
  32. <a href="issue_reporting.html">Bug Reports </a>&nbsp;&nbsp;
  33. </td>
  34. </table>
  35. <h1>Boost Filesystem Version 3</h1>
  36. <p>Version 3 is a major revision of the Boost Filesystem library. Important
  37. changes include:</p>
  38. <ul>
  39. <li>A single class <code>path</code> handles all aspects of
  40. internationalization, replacing the previous template and its <code>path</code>
  41. and <code>wpath</code> instantiations. Character types <code>char</code>,
  42. <code>wchar_t</code>, <code>char16_t</code>, and <code>char32_t</code> are
  43. supported. This is a major simplification of the path abstraction,
  44. particularly for functions that take path arguments.<br>
  45. &nbsp;</li>
  46. <li>New <code>class path</code> members include:<br>
  47. &nbsp;<ul>
  48. <li><code><a href="reference.html#path-has_stem">has_stem</a>()</code></li>
  49. <li><code><a href="reference.html#path-has_extension">has_extension</a>()</code></li>
  50. <li><code><a href="reference.html#path-is_absolute">is_absolute</a>()</code>. This renames <code>is_complete()</code>, which
  51. is now deprecated.</li>
  52. <li><code><a href="reference.html#path-is_relative">is_relative</a>()</code></li>
  53. <li><code><a href="reference.html#path-make_preferred">make_preferred</a>()<br>
  54. &nbsp;</code></li>
  55. </ul>
  56. </li>
  57. <li>New or improved operations functions include:<br>
  58. &nbsp;<ul>
  59. <li><code><a href="reference.html#absolute">absolute</a>()</code>. This replaces the operations function <code>
  60. complete()</code>, which is now deprecated. Semantics are now provided for a
  61. Windows corner case where the <code>base</code> argument was not an absolute
  62. path. Previously this resulted in an exception being thrown.</li>
  63. <li><code><a href="reference.html#create_symlink">create_symlink</a>()</code> now supported on both POSIX and Windows.</li>
  64. <li><code><a href="reference.html#read_symlink">read_symlink</a>()</code> function added. Supported on both POSIX and
  65. Windows. Used to read the contents of a symlink itself.</li>
  66. <li><code><a href="reference.html#resize_file">resize_file</a>()</code> function added. Supported on both POSIX and
  67. Windows. Used to shrink or grow a regular file.</li>
  68. <li><code><a href="reference.html#unique_path">unique_path</a>()</code> function added. Supported on both POSIX and
  69. Windows. Used to generate a secure temporary pathname.<br>
  70. &nbsp;</li>
  71. </ul>
  72. </li>
  73. <li>Support for error reporting via <code>error_code</code> is now uniform
  74. throughout the operations functions.<br>
  75. &nbsp;</li>
  76. <li>Documentation has been reworked, including re-writes of major portions.<br>
  77. &nbsp;</li>
  78. <li>A new <a href="tutorial.html">Tutorial</a> provides a hopefully much
  79. gentler and more complete introduction for new users. Current users might want
  80. to review the <a href="tutorial.html">three sections related to class path</a>.</li>
  81. </ul>
  82. <h2>Deprecated names and other features</h2>
  83. <p>See the <a href="deprecated.html">Deprecated Features page</a> for transition
  84. aids that allow much existing code to compile without change using Version 3.</p>
  85. <h2>Breaking changes</h2>
  86. <p>To ease the transition, Versions 2 and 3 will both be included in the next
  87. several Boost releases. Version 2 will be the default version for one release
  88. cycle, and then Version 3 will become the default version.</p>
  89. <h3>Class <code>path</code></h3>
  90. <ul>
  91. <li>Class template <code>basic_path</code> and its specializations are
  92. replaced by a single <code>class path</code>. Thus any code, such as
  93. overloaded functions, that depends on <code>path</code> and <code>wpath</code>
  94. being two distinct types will fail to compile and must be restructured.
  95. Restructuring may be as simple as removing one of the overloads, but also
  96. might require more complex redesign.<br>
  97. &nbsp;</li>
  98. <li>Certain functions now return <code>path</code> objects rather than <code>
  99. string or wstring</code> objects:<ul>
  100. <li><code>root_name()</code></li>
  101. <li><code>root_directory()</code></li>
  102. <li><code>filename()</code></li>
  103. <li><code>stem()</code></li>
  104. <li><code>extension()</code></li>
  105. </ul>
  106. <p>Not all uses will fail; if the function is being called in a context that
  107. accepts a <code>path</code>, all is well. If the result is being used in a
  108. context requiring a <code>std::string</code> or <code>std::wstring</code>,
  109. then <code>.string()</code> or <code>.wstring()</code> respectively must be
  110. appended to the function call.<br>
  111. &nbsp;</li>
  112. <li>&nbsp;<code>path::iterator::value_type</code> and&nbsp; <code>
  113. path::const_iterator::value_type</code> is <code>path</code> rather than <code>
  114. basic_string</code>.</li>
  115. </ul>
  116. <h3>Compiler support</h3>
  117. <ul>
  118. <li>Compilers and standard libraries that do not fully support wide characters
  119. and wide character strings (<code>std::wstring</code>) are no longer
  120. supported.<br>
  121. &nbsp;</li>
  122. <li>Cygwin versions prior to 1.7 are no longer supported because they lack
  123. wide string support. Cygwin now compiles only for the Windows API and path
  124. syntax.<br>
  125. &nbsp;</li>
  126. <li>MinGW versions not supporting wide strings are no longer supported.<br>
  127. &nbsp;</li>
  128. <li>Microsoft VC++ 7.1 and earlier are no longer supported.</li>
  129. </ul>
  130. <hr>
  131. <p>&copy; Copyright Beman Dawes, 2009</p>
  132. <p>Distributed under the Boost Software License, Version 1.0. See
  133. <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p>
  134. <p>Revised
  135. <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->29 December 2014<!--webbot bot="Timestamp" endspan i-checksum="39176" --></p>
  136. </body>
  137. </html>