CompareFiles.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="CompareFiles">
  5. <title>CompareFiles</title>
  6. <para><emphasis role="bold">STD.File.CompareFiles<indexterm>
  7. <primary>STD.File.CompareFiles</primary>
  8. </indexterm><indexterm>
  9. <primary>File.CompareFiles</primary>
  10. </indexterm><indexterm>
  11. <primary>CompareFiles</primary>
  12. </indexterm>(</emphasis> <emphasis> file1, file2 </emphasis> <emphasis
  13. role="bold">[</emphasis> <emphasis>, logicalonly </emphasis> <emphasis
  14. role="bold">]</emphasis> <emphasis> </emphasis> <emphasis
  15. role="bold">[</emphasis> <emphasis>, usecrcs </emphasis> <emphasis
  16. role="bold">]</emphasis> <emphasis> </emphasis> <emphasis
  17. role="bold">)</emphasis></para>
  18. <informaltable colsep="0" frame="none" rowsep="0">
  19. <tgroup cols="2">
  20. <colspec colwidth="80.50pt" />
  21. <colspec />
  22. <tbody>
  23. <row>
  24. <entry><emphasis>file1</emphasis></entry>
  25. <entry>A null-terminated string containing the logical name of the
  26. first file.</entry>
  27. </row>
  28. <row>
  29. <entry><emphasis>file2</emphasis></entry>
  30. <entry>A null-terminated string containing the logical name of the
  31. second file.</entry>
  32. </row>
  33. <row>
  34. <entry><emphasis>logicalonly</emphasis></entry>
  35. <entry>Optional. A boolean TRUE/FALSE flag that, when TRUE, does not
  36. compare physical information from disk but only the logical
  37. information in the system datastore (Dali). If omitted, the default
  38. is TRUE.</entry>
  39. </row>
  40. <row>
  41. <entry><emphasis>usecrcs</emphasis></entry>
  42. <entry>Optional. A boolean TRUE/FALSE flag indicating that, when
  43. TRUE, compares physical CRCs of all the parts on disk. This may be
  44. slow on large files. If omitted, the default is FALSE.</entry>
  45. </row>
  46. <row>
  47. <entry>Return:<emphasis> </emphasis></entry>
  48. <entry>CompareFiles returns returns an INTEGER4 value.</entry>
  49. </row>
  50. </tbody>
  51. </tgroup>
  52. </informaltable>
  53. <para>The <emphasis role="bold">CompareFiles </emphasis>function compares
  54. <emphasis>file1</emphasis> against <emphasis>file2</emphasis> and returns
  55. the following values:</para>
  56. <informaltable colsep="0" frame="none" rowsep="0">
  57. <tgroup cols="2">
  58. <colspec colwidth="80.50pt" />
  59. <colspec />
  60. <tbody>
  61. <row>
  62. <entry>0</entry>
  63. <entry><emphasis>file1</emphasis> and <emphasis>file2</emphasis>
  64. match exactly</entry>
  65. </row>
  66. <row>
  67. <entry>1</entry>
  68. <entry><emphasis>file1</emphasis> and <emphasis>file2</emphasis>
  69. contents match, but <emphasis>file1</emphasis> is newer than
  70. <emphasis>file2</emphasis></entry>
  71. </row>
  72. <row>
  73. <entry>-1</entry>
  74. <entry><emphasis>file1</emphasis> and <emphasis>file2</emphasis>
  75. contents match, but <emphasis>file2</emphasis> is newer than
  76. <emphasis>file1</emphasis></entry>
  77. </row>
  78. <row>
  79. <entry>2</entry>
  80. <entry><emphasis>file1</emphasis> and <emphasis>file2</emphasis>
  81. contents do not match and <emphasis>file1</emphasis> is newer than
  82. <emphasis>file2</emphasis></entry>
  83. </row>
  84. <row>
  85. <entry>-2</entry>
  86. <entry><emphasis>file1</emphasis> and <emphasis>file2</emphasis>
  87. contents do not match and <emphasis>file2</emphasis> is newer than
  88. <emphasis>file1</emphasis></entry>
  89. </row>
  90. </tbody>
  91. </tgroup>
  92. </informaltable>
  93. <para>Example:</para>
  94. <programlisting format="linespecific">A := STD.File.CompareFiles('Fred1', 'Fred2');
  95. </programlisting>
  96. </sect1>