CompuServe Thread

#Dir for C

3 messages in this thread
#30344From: Harry DavisJul 8, 1994 9:36 PM
Hello, Is there a function that performs similarly to Visual Basic's Dir function (checks if a file exists)? Thanks, \Harry Davis
#30359From: Chris BoaroJul 8, 1994 11:17 PM
If you simply want to know if a file exists, you can use the standard C library function, access() (or _access()). If you want more information about the file, it's time stamp or size for instance, you can use stat(). If you want to get a list of files in a directory, try _dos_findfirst() and _dos_findnext(). Chris
#30367From: Harry DavisJul 9, 1994 9:25 AM
Chris, Thanks. That's all I needed. -=-Harry