Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

external file modified date

jinliang_w_
Beginner
502 Views

There seems to be no simple way of obtaining the modified date of an external file in Fortran. Can anyone help with a few lines of Fortran code to get the information? Preferably, the code is portable across platforms and compilers (I know GFortran has an intrinsic function for this purpose).

0 Kudos
1 Reply
mecej4
Honored Contributor III
502 Views

Fortran, by itself, does not try to give you interfaces to file systems, and the information stored by the OS regarding a file is OS-dependent.

Intel Fortran provides the portability routine GETFILEINFOQQ in module IFPORT. Information available includes times of creation, last write and last access, depending upon the type of the file system in which the file resides.

0 Kudos
Reply