CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2002
    Posts
    10,943

    File creation time.

    It is easy to get the file's last modification time but what about the file's created time and date?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  2. #2
    Join Date
    Oct 2005
    Posts
    5

    Re: File creation time.

    you can get the inode last change time with filectime, which is as close as you can get.
    Freelancing software engineer
    visit http://www.edlin.org to contact me regarding software projects

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    Re: File creation time.

    Quote Originally Posted by software_engineer
    you can get the inode last change time with filectime, which is as close as you can get.
    Correct me if I am wrong, but won't that just return the same as the modified time? What is the difference between a change in a file and a modification of a file?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  4. #4
    Join Date
    Oct 2005
    Posts
    5

    Re: File creation time.

    Quote Originally Posted by peejavery
    Correct me if I am wrong, but won't that just return the same as the modified time? What is the difference between a change in a file and a modification of a file?
    filectime returns when the file was changed (permissions, ownership etc), so it is most likely to change less often than filemtime (which is when the file is modified).
    the created date is in general not stored.
    Freelancing software engineer
    visit http://www.edlin.org to contact me regarding software projects

  5. #5
    Join Date
    May 2002
    Posts
    10,943

    Re: File creation time.

    Quote Originally Posted by software_engineer
    filectime returns when the file was changed (permissions, ownership etc), so it is most likely to change less often than filemtime (which is when the file is modified).
    the created date is in general not stored.
    That is true but not too true. I work with files on a large scale Novell Network. Ownership and permissions are changed all the time. Pretty much there is no way to accomplish what I want with creation time.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured