>>-listFiles---------------------------------------------------><
Example 5.211. Class FILE - listFiles method
do file over deepListFiles("c:\program files\oorexx\samples") say file end -- Depth first iteration ::routine deepListFiles use strict arg directory, accumulator=(.List~new) files = .File~new(directory)~listFiles if files == .nil then return accumulator do file over files accumulator~append(file) if file~isDirectory then call deepListFiles file~absolutePath, accumulator end return accumulator /* Possible output */ c:\program files\oorexx\samples\api c:\program files\oorexx\samples\api\callrxnt c:\program files\oorexx\samples\api\callrxnt\backward.fnc c:\program files\oorexx\samples\api\callrxnt\callrxnt.c c:\program files\oorexx\samples\api\callrxnt\callrxnt.exe c:\program files\oorexx\samples\api\callrxnt\callrxnt.ico c:\program files\oorexx\samples\api\callrxnt\callrxnt.mak c:\program files\oorexx\samples\api\callrxwn c:\program files\oorexx\samples\api\callrxwn\backward.fnc (etc...)