RemoteDirectory.xml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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="RemoteDirectory">
  5. <title>RemoteDirectory</title>
  6. <para><emphasis role="bold">STD.File.RemoteDirectory<indexterm>
  7. <primary>STD.File.RemoteDirectory</primary>
  8. </indexterm><indexterm>
  9. <primary>File.RemoteDirectory</primary>
  10. </indexterm><indexterm>
  11. <primary>RemoteDirectory</primary>
  12. </indexterm>(</emphasis> <emphasis> machineIP, directory </emphasis>
  13. <emphasis role="bold">[</emphasis> <emphasis>, mask </emphasis> <emphasis
  14. role="bold">][</emphasis> <emphasis>, includesubs </emphasis> <emphasis
  15. role="bold">]</emphasis> <emphasis> </emphasis> <emphasis
  16. role="bold">)</emphasis></para>
  17. <informaltable colsep="1" frame="all" rowsep="1">
  18. <tgroup cols="2">
  19. <colspec colwidth="80.50pt" />
  20. <colspec />
  21. <tbody>
  22. <row>
  23. <entry><emphasis>machineIP</emphasis></entry>
  24. <entry>A null-terminated string containing the IP address of the
  25. remote machine.</entry>
  26. </row>
  27. <row>
  28. <entry><emphasis>directory</emphasis></entry>
  29. <entry>A null-terminated string containing the path to the directory
  30. to read. This must be in the appropriate format for the operating
  31. system running on the remote machine.</entry>
  32. </row>
  33. <row>
  34. <entry><emphasis>mask</emphasis></entry>
  35. <entry>Optional. A null-terminated string containing the filemask
  36. specifying which files to include in the result. If omitted,the
  37. default is '*' (all files).</entry>
  38. </row>
  39. <row>
  40. <entry><emphasis>includesubdir</emphasis></entry>
  41. <entry>Optional. A boolean flag indicating whether to include files
  42. from sub-directories under the <emphasis>directory</emphasis>. If
  43. omitted, the default is FALSE.</entry>
  44. </row>
  45. <row>
  46. <entry>Return:<emphasis> </emphasis></entry>
  47. <entry>RemoteDirectory returns a dataset in the following
  48. format:</entry>
  49. </row>
  50. </tbody>
  51. </tgroup>
  52. </informaltable>
  53. <programlisting>EXPORT FsFilenameRecord := RECORD
  54. STRING name; //filename
  55. UNSIGNED8 size; //filesize
  56. STRING19 modified; //date-time stamp
  57. END;</programlisting>
  58. <para>The <emphasis role="bold">RemoteDirectory </emphasis>function returns
  59. a list of files as a dataset in the format listed above from the specified
  60. <emphasis>machineIP</emphasis> and <emphasis>directory</emphasis>. If
  61. <emphasis>includesubdir</emphasis> is set to TRUE, then the name field
  62. contains the relative path to the file from the specified
  63. <emphasis>directory</emphasis>.</para>
  64. <para>The mask argument is a string that can include wildcard characters.
  65. Valid wildcard characters are '*' (to match zero or more characters) and '?'
  66. (to match exactly one character). Non-wild characters are matched exactly
  67. and are case-sensitive. </para>
  68. <para>Example:</para>
  69. <programlisting format="linespecific">OUTPUT(STD.File.RemoteDirectory('edata12','\in','*.d00'));
  70. OUTPUT(STD.File.RemoteDirectory('10.150.254.6',
  71. '/var/lib/HPCCSystems/hpcc-data/thor/','acc*',TRUE));</programlisting>
  72. </sect1>