Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I make a system call for file properties in C?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Does anyone know if it is possible to pull the file properties (e.g. LastModifiedDate, FirstGeneratedDate, FileSize) from a file in C? I'm using MSV 6.0

Thanks,
skullmonkey@antisocial.com
 
use ANSI C _stat() function. This fills a struct _stat structure with all the file info you need Nosferatu
We are what we eat...
There's no such thing as free meal...
 
Use 'stat' or 'fstat' defined in sys/stat.h
as Nosferatu mentioned.

If you want implement your program only for
Windows, use GetFileInformationByHandle if
you have a Windows file handle.
Use GetFileAttributesEx if you have a file
name. Hee S. Chung
heesc@netian.com
 
Use struct ffblk specified in the header file dir.h
Hope that helps.
SwapSawe.s-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top