www.delorie.com/djgpp/doc/libc/libc_527.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]



#include <fcntl.h>

char _lfn_get_ftime (int fhandle, int flag);


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:


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.)


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.




 unsigned file_stamp = _lfn_get_ftime (handle, _LFN_CTIME);

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004