public static void setScriptsExecutable ( File fileOrDir ) { List < File > files = new ArrayList <> ( ) ; if ( fileOrDir . isDirectory ( ) ) files . addAll ( Utils . listAllFiles ( fileOrDir , true ) ) ; else files . add ( fileOrDir ) ; for ( File f : files ) f . setExecutable ( true ) ; }
Recursively sets all files and directories executable starting from a file or base directory .