Quintiq file version 2.0
#parent: #root
Method PTF_GetFileCountFromResultLog (
  String user,
  String pattern
) as Number id:Method_LibPTF_pnlTestController_PTF_GetFileCountFromResultLog
{
  #keys: '[104342.0.375565899]'
  Body:
  [*
    // Checks the number of result files in the result log directory
    files     := OS::ScanDirectory( this.PTF_GetResultLogPath(), pattern );
    filecount := 0;
    fileuser  := "";
    clientid  := "";
    
    traverse( files, Elements, f )
    {
      this.PTF_GetInfoFromResultLogPath( fileuser, clientid, f );
    
      if( fileuser.ToUpper() = user.ToUpper() )
      {
        filecount := filecount + 1;
      }
    }
    
    return filecount;
  *]
}
