../pvss.htm menu.gif basics.gif

requestFileList()

The function requestFileList() requests a file list from the manager with the specified manager Id.

Synopsis

dyn_mapping requestFileList(int manId, string | dyn_string dirs[, mapping | dyn_mapping options);

Parameters

    Parameter

    Meaning

    manId

    The manager ID. See also function  convManIdToInt().

    dirs

    The parameter dirs contains the start directory for the search.

    options

    The parameter options contains a list of options:

    "fromTime": time. The default value is (1.1.1970). Only includes files that are younger than specified time.                  

    "recursive": bool. The default value is TRUE. Searches directories recursive meaning whether sub directories should be included.

    "excludeDirs": dyn_string. The default value is empty. List of directories (with wild cards) that should not be searched through recursive (for example,  */CVS/*).

    "allIfOneYounger": bool. The default value is false. If only one file in a directory is younger than "fromTime", all files from the directory will be returned. The option does not work recursive.

     "includeFiles": dyn_string. The default value is empty. A pattern to which the file names will be compared to. The files will be returned only if they correspond to the pattern. If the array is empty, all files will be considered.

Return value

The function returns 1 when it was executed successfully and in case of errors 0.

Errors

Missing or invalid arguments.

Description

The function requestFileList() requests a file list from the manager with the specified manager Id.

The result is an array of mappings with following values:

  • "size": File size

  • "time": Last modification time

  • "md5": MD5 Hash

  • "name": File name

IconEXAMPLE

 

In the first example all files from the panels directory  will be delivered and the time will not be restricted. In the second example the time will be restricted to a specific date and the option allIfOneYounger will be used. allIfOneYounger returns all files if only one file is younger than the specified date.

Assignment

File functions

Availability

CTRL

See also

      dirName()

Top Of Page

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved