Java 7: Déterminer la date de création et la taille d’un fichier

Author:

 int,string,char,static, url, socket, url, socket, java
{filelink=23}


package java7exemples;

import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
public class FileAttributs
{
          public static void main(String[] args)
           {
                try
                   {
                    Path path = FileSystems.getDefault().getPath("c:/test.txt");
                    System.out.println("Taille: "+Files.getAttribute(path, "size",""));
                    System.out.println( "Date Création création"+Files.getAttribute( path, "creationTime" ) );
                    }
                catch (IOException ex)
                {
                System.out.println("IOException: "+ex);
                }
          }
}

A Voir sur le même Sujet:

  • java nio2 date de création
  • java file date de création
  • java 7 fichier "date de création"
  • formater taille fichier c#
  • java.io.file creation date
  • Java: Obtenir la taille un fichier
  • class URLInfo java
  • determiner taille fichier image android java
  • codage de la date de création d'un fichier
  • recuperer la date de création d un fichier en java

Leave a Reply

Your email address will not be published. Required fields are marked *