Re: question on func get_file_info
- Posted by c.k.lester <euphoric at cklest?r.c?m> Jul 25, 2007
- 654 views
Salix wrote: > > Is there a better/simplier/faster solution for this? > > }}} <eucode> > include file.e > > function get_file_info(sequence x) > object dx > dx=dir(x) > if length(dx)=1 then --<-- possible error; need test You'll get an error here if directory x doesn't exist because x will be a atom and you can't get the length of an atom. > return dx[1] > end if > return 0 > end function > </eucode> {{{