Is there a UNIX equivalent for _finddata_t.time_write?

Is there a UNIX equivalent for _finddata_t.time_write?

Post by goodguy2003 » Sun, 22 Jun 2003 07:18:05



I am porting a program from Windows to Unix. Does anyone know that is
there a UNIX equivalent for  _finddata_t.time_write?

_finddate_t in io.h:
struct _finddata_t {
        unsigned    attrib;
        time_t      time_create;    /* -1 for FAT file systems */
        time_t      time_access;    /* -1 for FAT file systems */
        time_t      time_write;
        _fsize_t    size;
        char        name[260];

Quote:};

dirent in <dirent.h>
struct  dirent {
             ino_t           d_ino;
             off_t           d_off;
             unsigned short  d_reclen;
             char            d_name[1];
     };

I don't see time_write in dirent.

Thanks in advance.

 
 
 

Is there a UNIX equivalent for _finddata_t.time_write?

Post by Alan Coopersmit » Sun, 22 Jun 2003 07:23:47



|I am porting a program from Windows to Unix. Does anyone know that is
|there a UNIX equivalent for  _finddata_t.time_write?
|
|_finddate_t in io.h:
|struct _finddata_t {
|        unsigned    attrib;
|        time_t      time_create;    /* -1 for FAT file systems */
|        time_t      time_access;    /* -1 for FAT file systems */
|        time_t      time_write;
|        _fsize_t    size;
|        char        name[260];
|};

That looks more like the equivalent of stat() than dirent.

--
________________________________________________________________________


  Working for, but definitely not speaking for, Sun Microsystems, Inc.

 
 
 

Is there a UNIX equivalent for _finddata_t.time_write?

Post by Greg Andre » Sun, 22 Jun 2003 09:02:52



>I am porting a program from Windows to Unix. Does anyone know that is
>there a UNIX equivalent for  _finddata_t.time_write?

>_finddate_t in io.h:
>struct _finddata_t {
>        unsigned    attrib;
>        time_t      time_create;    /* -1 for FAT file systems */
>        time_t      time_access;    /* -1 for FAT file systems */
>        time_t      time_write;
>        _fsize_t    size;
>        char        name[260];
>};

>dirent in <dirent.h>
>struct  dirent {
>             ino_t           d_ino;
>             off_t           d_off;
>             unsigned short  d_reclen;
>             char            d_name[1];
>     };

>I don't see time_write in dirent.

Directory entries don't keep the file timestamps in Unix.  They only
keep the name of the file in the local directory and a pointer to
the inode.

Other info about a file (timestamps, file size, who owns it, the
access permissions, etc.) is kept in a thing called an "inode",
and retrieved via the stat(4) call.  See <sys/stat.h>

Note that the "ctime" timestamp actually reflects the last time
the inode information was changed, not the creation time.

  -Greg
--
Do NOT reply via e-mail.
Reply in the newsgroup.

 
 
 

1. Is there a UNIX equivalent for _finddata_t.time_write?

I am porting a program from Windows to Unix. Does anyone know that is
there a UNIX equivalent for  _finddata_t.time_write?

_finddate_t in io.h:
struct _finddata_t {
        unsigned    attrib;
        time_t      time_create;    /* -1 for FAT file systems */
        time_t      time_access;    /* -1 for FAT file systems */
        time_t      time_write;
        _fsize_t    size;
        char        name[260];

dirent in <dirent.h>
struct  dirent {
             ino_t           d_ino;
             off_t           d_off;
             unsigned short  d_reclen;
             char            d_name[1];
     };

I don't see time_write in dirent.

Thanks in advance.

2. Can not install RedHat 7.2 on win 98 dual boot

3. I am new to Unix and Unix Programming HELP!

4. you won't believe my first crash! :)

5. This clone thing...am I stupid, or am I right?

6. List of files on a tape

7. A Recommendation

8. I am with the following error, when i am running lilo...

9. Am I touchy? Or am I right?

10. Am I seeing IPv5, or am I hallucinating?

11. I am buying an Ultra 5 but am lost in part numbers ....

12. I am in text mode, what browser am I running....