<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>listfiles</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="listfiles"> list files</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>files= listfiles(paths [,flag,flagexpand])  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>paths</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: a string matrix giving a set of pathnames (eventually  ended by a pattern built with <VERB>*</VERB>)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>flag,flagexpand</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: boolean optional parameters. (default value <VERB>%t</VERB>).</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>files</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: a string matrix.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>listfiles</VERB> can be used to list the files which match 
    the patterns given by one of the paths entries. 
    Patterns are given to the unix <VERB>ls</VERB> or to the windows
    <VERB>dir</VERB> commands in order to get information on files. 
    Thus in order to write portable Scilab script valid wildcard patterns 
    for both os are to be given. Note that Pathname conversion is
    performed and for example <VERB>SCI/macros/util/*.sci</VERB> is a valid 
    pattern for both unix and windows.</P>
    <P>
    if <VERB>flag</VERB> is true the pathnames given by <VERB>paths</VERB> are 
    converted according to the MSDOS value (See <VERB>pathconvert</VERB>). 
    Moreover, if <VERB>flagexpand</VERB> is true leading strings like
    <VERB>HOME</VERB>, <VERB>SCI</VERB> or <VERB>~</VERB> are expanded using environment
    variables.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
files=listfiles(['SCI/macros/util/*.sci';'SCI/macros/util/*.bin']);
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>basename</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>pathconvert</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
