Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>function:</b> filetime() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    FILETIME()

Purpose:     Retrieve the last update time for a given file.

Syntax:      FILETIME( filename )

Arguments:   filename    - Character string or variable indicating the
                           name of the file for which to extract the time.
                           This filename (filespec) must and may adhere to
                           any fully qualified filename as required by
                           ADIR().

Returns:     Character time string of <filename> from the DOS directory
             entry.

Description: This function extracts the time from the given file directory
             entry information.  It is useful for comparing the times of
             two files, or for using the file time for a variety of
             purposes.  FILETIME() can be used in conjunction with
             FILEDATE() to determine if an index file is current with the
             associated .DBF file.  FILETIME() simplifies all the ADIR()
             and associated lines of code to get the file time.

Notes:       If an invalid filename is given, or if the file does not
             exist, FILETIME() will return a null string ("").  Beware
             that if the file being checked is currently open, the time
             from the directory entry may not reflect updates until the
             file is closed.

Example:     *-- see if the date and time of the .DBF and .NTX files agree
             ok = (FILETIME("myfile.dbf") == FILETIME("myfile.ntx") .AND.;
                   FILEDATE("myfile.dbf") == FILEDATE("myfile.ntx"))
             USE myfile INDEX myfile
             IF .NOT.  ok
                pbox = SAYINBOX("Please wait, updating index")
                REINDEX
                GO TOP
                POPBOX(pbox)
             ENDIF

Source:      RL_FILET.PRG

See also:    FILEDATE(), FILESIZE()

See Also: FILEDATE() FILESIZE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson