getFileNamesRemote()

The function searches for files recursive and relative to the project path. The function works not only on a local machine but on mobile devices.

Synopsis

dyn_string getFileNamesRemote(dyn_string dsDirectories, string pattern = "*", dyn_string dsProjNames = makeDynString());

Parameters

Parameter Meaning
dsDirectories Project sub directory to search in.
pattern

File pattern used for searching file names, default is all ("*"). Pattern is case-sensitive also for Windows platform. Pattern is only applied to file names, not directory names.

Example for search either *.pnl or *.xml: *.[px][nm][l] (would also find *.pml;*.xnl etc.) since "one" of the characters in square brackets is searched. For details, see patternMatch().

dsProjNames List of project names (project + sub projects) to search for files. If omitted then the current project (where the Web Server is running) is searched.

Return value

The function returns list of file names

Description

The function searches for files recursive and relative to the project path. The function works not only on a local machine but on mobile devices.

Example

The following example returns all files from the "panels" directory.

  1. main(mapping event)
    
    
    {
    
    
      dyn_string dir = makeDynString("panels");
    
    
      dyn_string projName = makeDynString("WinCCOA_Proj");
    
    
      dyn_string retVal;
    
    
      string pat;
    
    
      retVal=getFileNamesRemote(dir, pat, projName);
    
    
      DebugN("Files:", retVal);
    
    
    }

Assignment

File function

Availability

CTRL, UI