Java7: Vérifier si un fichier est exécutable

Author:

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

/**
 * @(#)ExecutableFile.java
 *
 *
 * @author 
 *sakoba(java.mesexemples.com) @version 1.00 2012/12/11
 */

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.FileSystems;

public class ExecutableFile {

    public static void main (String[] args) 
    {
    	Path path = FileSystems.getDefault().getPath("c:/users.txt");
    	System.out.println ("Fichier est il exécutable? "+Files.isExecutable(path));
    }
    
}

A Voir sur le même Sujet:

  • déplacer un fichier éxécutable en java
  • perl test si un fichier est exécutable
  • code source en java de la vérification de fichier executable
  • fichier executable en java

Leave a Reply

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