read file directori tree param dir base directori collect file collect read file name file dir list ret arrai list prefix dir path length travers dir dir file action act file directori ret add substr prefix io except ioe defin log lp log granular type statement log error except read file name ioe endif ret 