public static String execCommand(String[] commandLine, boolean waitAfterRead, ISVNReturnValueCallback callback) throws SVNException { return execCommand(commandLine, null, waitAfterRead, callback); }
public static String execCommand(String[] commandLine, boolean waitAfterRead, ISVNReturnValueCallback callback) throws SVNException { return execCommand(commandLine, null, waitAfterRead, callback); }
public static String execCommand(String[] commandLine) throws SVNException { return execCommand(commandLine, false, null); }
public static String execCommand(String[] commandLine) throws SVNException { return execCommand(commandLine, false, null); }
public static String execCommand(String[] commandLine) throws SVNException { return execCommand(commandLine, false, null); }
public static String execCommand(String[] commandLine, boolean waitAfterRead, ISVNReturnValueCallback callback) throws SVNException { return execCommand(commandLine, null, waitAfterRead, callback); }
private static String getCurrentGroup() { if (isWindows) { return System.getProperty("user.name"); } if (ourGroupID == null) { ourGroupID = execCommand(new String[] { "id", "-g" }); if (ourGroupID == null) { ourGroupID = "0"; } } return ourGroupID; }
private static String getCurrentUser() { if (isWindows) { return System.getProperty("user.name"); } if (ourUserID == null) { ourUserID = execCommand(new String[] { "id", "-u" }); if (ourUserID == null) { ourUserID = "0"; } } return ourUserID; }
private static String getCurrentUser() throws SVNException { if (isWindows || isOpenVMS) { return System.getProperty("user.name"); } if (ourUserID == null) { ourUserID = execCommand(new String[] { ID_COMMAND, "-u" }); if (ourUserID == null) { ourUserID = "0"; } } return ourUserID; }
private static String getCurrentGroup() throws SVNException { if (isWindows || isOpenVMS) { return System.getProperty("user.name"); } if (ourGroupID == null) { ourGroupID = execCommand(new String[]{ ID_COMMAND, "-g" }); if (ourGroupID == null) { ourGroupID = "0"; } } return ourGroupID; }
public static String getCurrentUser() throws SVNException { if (isWindows || isOpenVMS) { return System.getProperty("user.name"); } if (ourUserID == null) { ourUserID = execCommand(new String[] { ID_COMMAND, "-u" }); if (ourUserID == null) { ourUserID = "0"; } } return ourUserID; }
public static String getCurrentGroup() throws SVNException { if (isWindows || isOpenVMS) { return System.getProperty("user.name"); } if (ourGroupID == null) { ourGroupID = execCommand(new String[] { ID_COMMAND, "-g" }); if (ourGroupID == null) { ourGroupID = "0"; } } return ourGroupID; }
public static boolean isSymlink(File file) { if (isWindows || file == null) { return false; } String line = execCommand(new String[] { "ls", "-ld", file.getAbsolutePath() }); return line != null && line.startsWith("l"); }
public static String getSymlinkName(File link) { if (isWindows || link == null) { return null; } String ls = execCommand(new String[] { "ls", "-ld", link.getAbsolutePath() }); if (ls == null || ls.lastIndexOf(" -> ") < 0) { return null; } String[] attributes = ls.split("\\s+"); return attributes[attributes.length - 1]; }
public static boolean createSymlink(File link, String linkName) { execCommand(new String[] { "ln", "-s", linkName, link.getAbsolutePath() }); return isSymlink(link); }
private static boolean isSymlink(File file) { String line = null; try { line = SVNFileUtil.execCommand(new String[] { SVNFileUtil.LS_COMMAND, "-ld", file.getAbsolutePath() }); } catch (Throwable th) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.DEFAULT, th); } return line != null && line.startsWith("l"); }
private static boolean isSymlink(File file) { String line = null; try { line = SVNFileUtil.execCommand(new String[] { SVNFileUtil.LS_COMMAND, "-ld", file.getAbsolutePath() }); } catch (Throwable th) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.DEFAULT, th); } return line != null && line.startsWith("l"); }
public static void setExecutable(File file, boolean executable) { if (isWindows || file == null || !file.exists()) { return; } try { execCommand(new String[] { "chmod", executable ? "ugo+x" : "ugo-x", file.getAbsolutePath() }); } catch (Throwable th) { SVNDebugLog.getDefaultLog().info(th); } }
private static boolean isSymlink(File file) { String line = null; try { line = SVNFileUtil.execCommand(new String[] { SVNFileUtil.LS_COMMAND, "-ld", file.getAbsolutePath() }); } catch (Throwable th) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.DEFAULT, th); } return line != null && line.startsWith("l"); }
private static File createTestFile(File tmpDir, String permissions, ISVNReturnValueCallback callback) throws SVNException { File file = SVNFileUtil.createUniqueFile(tmpDir, "svnkit", ".init.jna", false); SVNFileUtil.execCommand(new String[]{SVNFileUtil.getChmodCommand(), permissions, file.getAbsolutePath()}, true, callback); return file; }