Date Created is not going to change while delete file and then create file

Viewed 2602

due to some reason i have to remove older file and create new file according to our client

Date Modified is change to current time but Date Created is not change to current time.

enter image description here my code is as follows

  public static void main(String args[]) throws Exception {
    FileUtils.deleteQuietly(new File("d:\\inbox\\json\\test.txt"));
    FileWriter fileWriter = new FileWriter("d:\\inbox\\json\\test.txt", false);
    fileWriter.append(new Date().toString());
    fileWriter.close();
  }

this code remove older data and write new data

but why date created time is not changed..

please help me to figure out what's in wrong with my code. thanks in advance.

8 Answers
Related