Last modified date?

This is a discussion on Last modified date? within the C++ Programming forums, part of the General Programming Boards category; I'd be pleased to know how I can get the "last modified" -date&time from a file... the code should be ...

  1. #1
    Registered User Hoxu's Avatar
    Join Date
    Nov 2001
    Posts
    25

    Unhappy Last modified date?

    I'd be pleased to know how I can get the "last modified" -date&time from a file... the code should be linux compatible.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,335
    Use the stat() function in sys/stat.h
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User Hoxu's Avatar
    Join Date
    Nov 2001
    Posts
    25

    Smile

    ok, thanks. Just got a bit confused about Borland C++ compiler help.. it claimed that ctime, mtime and atime were the same

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,335
    > it claimed that ctime, mtime and atime were the same
    They are in DOS, cos it's a lame OS on an even lamer file system

    If you want differences, then you need an NTFS partition and an NT type OS.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advancing day by day until it matches a second date
    By nhubred in forum C++ Programming
    Replies: 1
    Last Post: 05-30-2009, 08:55 AM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  3. Date Last Modified
    By magic.mike in forum Windows Programming
    Replies: 5
    Last Post: 09-23-2005, 05:13 AM
  4. CDate Class - handle date manipulation simply
    By LuckY in forum C++ Programming
    Replies: 5
    Last Post: 07-16-2003, 08:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21