@Override public String run() { return getProperty("os.name"); //$NON-NLS-1$ } });
/** * @return try to get user name of the logged on user from the operating * system */ private static String getDefaultUserName() { // get the system user name String username = system().getProperty(Constants.OS_USER_NAME_KEY); if (username == null) username = Constants.UNKNOWN_USER_DEFAULT; return username; }
@Override public String run() { return SystemReader.getInstance().getProperty("line.separator"); //$NON-NLS-1$ } });
@Override public String run() { return SystemReader.getInstance() .getProperty(Constants.OS_USER_NAME_KEY); } });
@Override public Integer get() { String rawValue = SystemReader.getInstance() .getProperty(MAX_REDIRECT_SYSTEM_PROPERTY); Integer value = Integer.valueOf(DEFAULT_MAX_REDIRECTS); if (rawValue != null) { try { value = Integer.valueOf(Integer.parseUnsignedInt(rawValue)); } catch (NumberFormatException e) { LOG.warn(MessageFormat.format( JGitText.get().invalidSystemProperty, MAX_REDIRECT_SYSTEM_PROPERTY, rawValue, value)); } } return value; } }).get().intValue();
/** {@inheritDoc} */ @Override public boolean setExecute(File f, boolean canExecute) { if (!isFile(f)) return false; if (!canExecute) return f.setExecutable(false, false); try { Path path = FileUtils.toPath(f); Set<PosixFilePermission> pset = Files.getPosixFilePermissions(path); // owner (user) is always allowed to execute. pset.add(PosixFilePermission.OWNER_EXECUTE); int mask = umask(); apply(pset, mask, PosixFilePermission.GROUP_EXECUTE, 1 << 3); apply(pset, mask, PosixFilePermission.OTHERS_EXECUTE, 1); Files.setPosixFilePermissions(path, pset); return true; } catch (IOException e) { // The interface doesn't allow to throw IOException final boolean debug = Boolean.parseBoolean(SystemReader .getInstance().getProperty("jgit.fs.debug")); //$NON-NLS-1$ if (debug) System.err.println(e); return false; } }
.getProperty("user.dir"); //$NON-NLS-1$ if (dStr == null) dStr = "."; //$NON-NLS-1$ String dStr = SystemReader.getInstance().getProperty( "user.dir"); //$NON-NLS-1$ if (dStr == null)
public String run() { return getProperty("os.name"); //$NON-NLS-1$ } });
@Override public String run() { return getProperty("os.name"); //$NON-NLS-1$ } });
/** * @return try to get user name of the logged on user from the operating * system */ private static String getDefaultUserName() { // get the system user name String username = system().getProperty(Constants.OS_USER_NAME_KEY); if (username == null) username = Constants.UNKNOWN_USER_DEFAULT; return username; }
/** * @return try to get user name of the logged on user from the operating * system */ private static String getDefaultUserName() { // get the system user name String username = system().getProperty(Constants.OS_USER_NAME_KEY); if (username == null) username = Constants.UNKNOWN_USER_DEFAULT; return username; }
public String run() { return SystemReader.getInstance().getProperty("line.separator"); //$NON-NLS-1$ } });
@Override public String run() { return SystemReader.getInstance().getProperty("line.separator"); //$NON-NLS-1$ } });
@Override public String run() { return SystemReader.getInstance() .getProperty(Constants.OS_USER_NAME_KEY); } });
@Override public Integer get() { String rawValue = SystemReader.getInstance() .getProperty(MAX_REDIRECT_SYSTEM_PROPERTY); Integer value = Integer.valueOf(DEFAULT_MAX_REDIRECTS); if (rawValue != null) { try { value = Integer.valueOf(Integer.parseUnsignedInt(rawValue)); } catch (NumberFormatException e) { LOG.warn(MessageFormat.format( JGitText.get().invalidSystemProperty, MAX_REDIRECT_SYSTEM_PROPERTY, rawValue, value)); } } return value; } }).get().intValue();
.getInstance().getProperty("jgit.fs.debug")); //$NON-NLS-1$ if (debug) System.err.println(e);
@Override public boolean setExecute(File f, boolean canExecute) { if (!isFile(f)) return false; if (!canExecute) return f.setExecutable(false); try { Path path = f.toPath(); Set<PosixFilePermission> pset = Files.getPosixFilePermissions(path); // owner (user) is always allowed to execute. pset.add(PosixFilePermission.OWNER_EXECUTE); int mask = umask(); apply(pset, mask, PosixFilePermission.GROUP_EXECUTE, 1 << 3); apply(pset, mask, PosixFilePermission.OTHERS_EXECUTE, 1); Files.setPosixFilePermissions(path, pset); return true; } catch (IOException e) { // The interface doesn't allow to throw IOException final boolean debug = Boolean.parseBoolean(SystemReader .getInstance().getProperty("jgit.fs.debug")); //$NON-NLS-1$ if (debug) System.err.println(e); return false; } }
/** {@inheritDoc} */ @Override public boolean setExecute(File f, boolean canExecute) { if (!isFile(f)) return false; if (!canExecute) return f.setExecutable(false, false); try { Path path = FileUtils.toPath(f); Set<PosixFilePermission> pset = Files.getPosixFilePermissions(path); // owner (user) is always allowed to execute. pset.add(PosixFilePermission.OWNER_EXECUTE); int mask = umask(); apply(pset, mask, PosixFilePermission.GROUP_EXECUTE, 1 << 3); apply(pset, mask, PosixFilePermission.OTHERS_EXECUTE, 1); Files.setPosixFilePermissions(path, pset); return true; } catch (IOException e) { // The interface doesn't allow to throw IOException final boolean debug = Boolean.parseBoolean(SystemReader .getInstance().getProperty("jgit.fs.debug")); //$NON-NLS-1$ if (debug) System.err.println(e); return false; } }
.getProperty("user.dir"); //$NON-NLS-1$ if (dStr == null) dStr = "."; //$NON-NLS-1$ String dStr = SystemReader.getInstance().getProperty( "user.dir"); //$NON-NLS-1$ if (dStr == null)
.getProperty("user.dir"); //$NON-NLS-1$ if (dStr == null) dStr = "."; //$NON-NLS-1$ String dStr = SystemReader.getInstance().getProperty( "user.dir"); //$NON-NLS-1$ if (dStr == null)