The date and time stamp of the file is stored in the find_t.wr_date and find_t.wr_time structure members. The file date is stored in a two-byte unsigned integer as shown here:
Showing posts with label DOS. Show all posts
Showing posts with label DOS. Show all posts
Saturday, 10 March 2012
How do you list a file’s date and time?
A file’s date and time are stored in the find_t structure returned from the _dos_findfirst() and _dos_findnext() functions.
The date and time stamp of the file is stored in the find_t.wr_date and find_t.wr_time structure members. The file date is stored in a two-byte unsigned integer as shown here:
Because DOS stores a file’s seconds in two-second intervals, only the
The date and time stamp of the file is stored in the find_t.wr_date and find_t.wr_time structure members. The file date is stored in a two-byte unsigned integer as shown here:
Monday, 5 March 2012
How do you list files in a directory?
Unfortunately, there is no built-in function provided in the C language such as dir_list() that would easily provide you with a list of all files in a particular directory. By utilizing some of C’s built-in directory functions, however, you can write your own dir_list() function.
First of all, the include file dos.h defines a structure named find_t, which represents the structure of the DOS file entry block. This
First of all, the include file dos.h defines a structure named find_t, which represents the structure of the DOS file entry block. This
Subscribe to:
Posts (Atom)