Mail Archives: djgpp/1998/01/10/23:15:32
Tim Bruning wrote:
>
> I want my program to read the drive letter , directory , and files on a
> disk
> and then display the current drive and directory (like windows' open
> and save boxes)
> anyone know of a way to do this ?
Most C compilers include a complete set of functions for reading
directories and file structures. Look up the following to see what will
work best for you:
getmntent()
opendir()/readdir()/closedir()
access()
stat()
findfirst()/findnext()
__file_tree_walk()
getcwd()/getwd()
In fact, just about all of these and more can be found in "info libc
'functional categories' 'file system functions'".
hth
--
---------------------------------------------------------------------
| John M. Aldrich | "Sin lies only in hurting other |
| aka Fighteer I | people unnecessarily. All other |
| mailto:fighteer AT cs DOT com | 'sins' are invented nonsense." |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -