Java File Attribute makeExecutable(String path)

Here you can find the source of makeExecutable(String path)

Description

make Executable

License

Apache License

Declaration

public static void makeExecutable(String path) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {
    public static void makeExecutable(String path) {
        if (path == null) {
            return;
        }//from   w w  w  .  j  a  v a 2  s  .c o  m
        File file = new File(path);
        if (file.exists() && !file.canExecute()) {
            file.setExecutable(true);
        }
    }
}

Related

  1. makeExecutable(File file)
  2. makeExecutable(File file)
  3. makeExecutable(File file)
  4. makeExecutable(File file)
  5. makeExecutable(File target)
  6. parallel(ExecutorService executor, Collection> tasks)
  7. patchInfoPList(final File infoPList, final String executable)
  8. persistExecutionTimesCsv(String filePath, LinkedList> executionTimes)
  9. setExecutable(File f, final String pattern)