/* library for manipulations on files - by Marc BARILLEY*/ /* needed package : none */ /* first call is: getPathFile "" */ fun getPathFile (longfile, file)= if (longfile==nil) || (strlen longfile)==0 || (nth_char longfile ((strlen longfile)-1)) == '/ then [longfile file] else getPathFile substr longfile 0 (strlen longfile)-1 strcat substr longfile ((strlen longfile)-1) 1 file;;