Páginas filhas
  • LOG_file_getListCount

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
linenumberstrue
DEFINE ma_files ARRAY[] OF RECORD
                filetype  CHAR(01),
                filename  CHAR(100)
                END RECORD

FUNCTION LOG_fileListDir_test()
  DEFINE l_file_name CHAR(250)
  DEFINE l_ind       SMALLINT
  DEFINE l_count     SMALLINT
  DEFINE l_total     SMALLINT
  DEFINE l_drive, l_path, l_name, l_extension CHAR(100)


  LET l_total = LOG_file_getListCount("c:\\temp\\","*.txt",FALSE,TRUE,0)



  FOR l_ind = 1 TO l_total
      LET l_file_name = LOG_file_getFromList(l_ind)

      CALL LOG_file_splithPath(l_file_name) RETURNING l_drive, l_path, l_name, l_extension

      LET l_count = l_count + 1
      CALL ArrayAddItem(ma_files,1)

      LET ma_files[l_count].filename = l_name CLIPPED, l_extension 
      LET ma_files[l_count].filetype = LOG_file_getTypeFromList(l_ind)

      IF ma_files[l_count].filetype = "D" THEN
         CALL conout("Diretório = "||ma_files[l_count].filename)
      ELSE  
         CALL conout("Arquivo = "||ma_files[l_count].filename)
      END IF
  END FOR
END FUNCTION

...