"Marcia Hon" <Ma********@hotmail.com> wrote in message
news:52*************************@posting.google.co m...
I would like to know how the following may be accomplished in C:
1. Check if a directory is empty.
2. Empty the directory.
Please if you know how could you state what statements in C would
accomplish this?
Marcia,
Please be aware that this newsgroup discusses the C language as defined by
the ISO standard, sometimes also refered to as ANSI C. In standard C, there
are no such things like directories. True, there are files in C, but to do
anything with them, you must know their names, so standard C is not good for
your purpose. You will need to use some language extension for your
platform. These may be different depending on whether you want to program
for DOS, Windows, OS/2, Open VM, Macintosh, Linux, Unix, DeathStation 9000
OS (in increasing order of preference).
Please consult the manual coming with your implementation or ask in a
newsgroup relevant to your compiler and/or operating system.
HTH,
Peter