Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>_lfn_get_ftime</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
_lfn_get_ftime
==============

Syntax
------

     #include <fcntl.h>
     
     char _lfn_get_ftime (int fhandle, int flag);

Description
-----------

This function returns creation and access time for files that reside on
a filesystem which supports long filenames (such as Windows 95).  Files
which reside on native FAT filesystems will cause this function to fail.
The FHANDLE parameter is the file handle as returned by one of the
functions which open or create files.  The FLAG parameter determines
which time (creation or access) is returned.  It can be set to one of
the following:

`_LFN_ATIME'
     Causes `_lfn_get_ftime' to return the time when the file was last
     accessed.  (Currently, it actually only returns the *date* of last
     access; the time bits are all zeroed.)

`_LFN_CTIME'
     Causes `_lfn_get_ftime' to return the time when the file was
     created.  Note that if the file was created by a program which
     doesn't support long filenames, this time will be zero.

Return value
------------

The file time stamp, as a packed unsigned int value:

`Bits 0-4'
     seconds divided by 2

`Bits 5-10'
     minutes (0-59)

`Bits 11-15'
     hours (0-23)

`Bits 16-20'
     day of the month (1-31)

`Bits 21-24'
     month (1 = January)

`Bits 25-31'
     year offset from 1980 (add 1980 to get the actual year)

If the underlying system calls fail, the function will return 0 and set
`errno' to an appropriate value.

Example
-------

      unsigned file_stamp = _lfn_get_ftime (handle, _LFN_CTIME);


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