Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!aramis.rutgers.edu!topaz.rutgers.edu!armhold
From: armhold@topaz.rutgers.edu (George Armhold)
Newsgroups: comp.sys.amiga.tech
Subject: IsaDir type function in C
Keywords: Lattice C, beginner, flames >NIL:
Message-ID: 
Date: 14 Aug 89 00:23:18 GMT
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 15


Our lab has just acquired Lattice C V 5.02 and I'm finally getting
around to learning the language.  I'm writing a "move" function that
simply moves a file to a new location/name.  (Please, no flames for
re-inventing the wheel- I'm doing it just to learn.)  I've got it 
working fine on regular files, but I'd like to make it work on
directories too.  I need a function that will let me know if a
file is a directory.  Also I need to know how to access individual
files within the directory.  A recursive routine wouldn't be that hard
to implement if I could just get the directory info.  K&R mentions the
stat function on pg 170, but it appears to be UNIX only, as it is not
listed in the Lattice manuals.  Could somebody please help me out?

Thanks,
-George