read file directori memori param dir directori read file collect sourc unit object collect sourc unit read file file dir list sourc unit ret arrai list sourc unit prefix dir path length travers dir dir file action act file io except skip backup file actual workaround cpp gener creat backup file bug directori end bak todo us platform charact encod specifi encod produc predict result file reader fr file reader buffer reader bfr buffer reader fr buffer result buffer length line bfr read line result append line line bfr read line line result append line ret add sourc unit substr prefix result bfr close fr close ret io except ioe defin log lp log granular type statement log error except read file ioe endif 