Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>filetime()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FILETIME()
 Determines a file's time
------------------------------------------------------------------------------
 Syntax

     FILETIME([<cFileMap>, [<nFileAttr>]]) --> cFileClockTime

 Arguments

     <cFileMap>  Designates the file name, including the path and drive
     designation.

     <nFileAttr>  Designates the file attribute explained in the table
     below.  The default value is 0.

     ()  If the function is called without parameters, it returns the file
     time from the current FILESEEK() buffer.

 Returns

     FILETIME() returns the clock time for the "searched for" entry, the
     clock time from the FILESEEK() buffer (when called without parameters),
     or a null string.

 Description

     Implement FILETIME() alone or  in conjunction with FILESEEK().  If the
     function is called with the <cFileMap> parameter, it returns the time of
     the first entry found.  If no matching entry is available, a null string
     is returned.

     When called without parameters, FILETIME() returns the clock time of the
     last file found with FILESEEK().  You can also determine the clock time
     of file groups (wildcards) when the function is used in conjunction with
     FILESEEK().

     You can designate the attribute for the desired file in numeric form:

     Table 7-17:  Coding the File Attribute
     ------------------------------------------------------------------------
     Value   Symb. constants     Assigned attribute
     ------------------------------------------------------------------------
     0       FA_NORMAL
     1       FA_READONLY         READ ONLY (Read-only)
     2       FA_HIDDEN           HIDDEN (Hidden files)
     4       FA_SYSTEM           SYSTEM (System files)
     16      FA_DIRECTORY        (Subdirectory)
     32      FA_ARCHIVE          ARCHIVE (Changes since last backup)
     ------------------------------------------------------------------------

     Only the SYSTEM, HIDDEN, VOLUME, or DIR attributes must be specified for
     an entry to be found.  If multiple attributes are implemented
     simultaneously, the table values are added accordingly.  Of course, not
     all combinations are useful.

 Examples

     .  The clock time of a particular file:

        ? FILETIME("C:\TEXT\TEXT.TXT")      // File clock time or ""

     .  The clock time of an ARCHIVE/HIDDEN file:

        ? FILETIME("C:\HIDE.TXT", 34")      // File clock time or ""

     .  Used in conjunction with FILESEEK():

        cFile  :=  FILESEEK(C:\TEXT.TXT")
        DO WHILE .NOT. EMPTY(cFile)
           ? cFile, FILETIME()              // File name and clock time
           cFile  := FILESEEK()             // Search for next entry
        ENDDO


See Also: FILESEEK() FILEATTR() FILEDATE() FILESIZE()

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