Java File Attribute setExecutable(File file)

Here you can find the source of setExecutable(File file)

Description

set Executable

License

Open Source License

Declaration

public static boolean setExecutable(File file) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;
import java.io.FilePermission;

public class Main {
    public static boolean setExecutable(File file) {
        try {//from ww w .  j  a  v  a2s .  c  o  m
            new FilePermission(file.getAbsolutePath(), "execute");
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}

Related

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