www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/02/02/12:31:49

Date: Wed, 2 Feb 1994 18:03:15 +0100 (MET)
From: Christoph Kuhmuench <fb33 AT rummelplatz DOT uni-mannheim DOT de>
Subject: finfirst(..), findnext(..)
To: djgpp Maillist <djgpp AT sun DOT soe DOT clarkson DOT edu>

Hello there,

I have this little problem with with reading directoryinformation:

I use the functions findfirst and findnext to read the fileinformation 
of a directory and it works fine! My problem is, that I don't know how 
to unpack the time and date of a file. The function's findfirst and 
findnext give back struct ffblk
  struct ffblk {
      char  ff_reserved[21];
      char  ff_attrib;
      short ff_ftime;
      short ff_fdate;
      short ff_filler;
      long  ff_fsize;
      char  ff_name[16];
  };

Turbo-Pascal includes the function Unpacktime() to interprete the values 
of ff_ftime and ff_fdate. Is there a similiar function in djgcc?

Another problem is, that those functions are really slow. I just read 
the information of a single directory and it took about 2 seconds to 
read the 16 entries in this directory (It was NOT a floppy-disk!)
I understand that those functions use interrupts to read the 
directory-information and that it takes time if you are in protected 
mode.
But maybe somebody knows a faster way to get fileinformation.

     Thanks in advance for your help

                  Chris


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019