/** * Sets the last modified time of this file. Is only called if {@link #doGetType} does not return * {@link FileType#IMAGINARY}. * * @param modtime is modification time in milliseconds. SFTP protocol can send times with nanosecond precision but * at the moment jsch send them with second precision. */ @Override protected boolean doSetLastModifiedTime(final long modtime) throws Exception { final int newMTime = (int) (modtime / MOD_TIME_FACTOR); attrs.setACMODTIME(attrs.getATime(), newMTime); flushStat(); return true; }
/** * Sets the last modified time of this file. Is only called if {@link #doGetType} does not return * {@link FileType#IMAGINARY}. * * @param modtime is modification time in milliseconds. SFTP protocol can send times with nanosecond precision but * at the moment jsch send them with second precision. */ @Override protected boolean doSetLastModifiedTime(final long modtime) throws Exception { final int newMTime = (int) (modtime / MOD_TIME_FACTOR); attrs.setACMODTIME(attrs.getATime(), newMTime); flushStat(); return true; }
/** * Sets the last modified time of this file. Is only called if {@link #doGetType} does not return * {@link FileType#IMAGINARY}. * * @param modtime is modification time in milliseconds. SFTP protocol can send times with nanosecond precision but * at the moment jsch send them with second precision. */ @Override protected boolean doSetLastModifiedTime(final long modtime) throws Exception { final int newMTime = (int) (modtime / MOD_TIME_FACTOR); attrs.setACMODTIME(attrs.getATime(), newMTime); flushStat(); return true; }
/** * Sets the last modified time of this file. Is only called if * {@link #doGetType} does not return {@link FileType#IMAGINARY}. * * @param modtime * is modification time in milliseconds. SFTP protocol can send * times with nanosecond precision but at the moment jsch send * them with second precision. */ @Override protected boolean doSetLastModifiedTime(final long modtime) throws Exception { final int newMTime = (int) (modtime / MOD_TIME_FACTOR); attrs.setACMODTIME(attrs.getATime(), newMTime); flushStat(); return true; }
@Override protected boolean doSetWritable(final boolean writable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeWritable(writable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetExecutable(final boolean executable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeExecutable(executable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetWritable(final boolean writable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeWritable(writable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetWritable(final boolean writable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeWritable(writable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetReadable(final boolean readable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeReadable(readable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetReadable(final boolean readable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeReadable(readable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetExecutable(final boolean executable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeExecutable(executable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetReadable(final boolean readable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeReadable(readable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetExecutable(final boolean executable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeExecutable(executable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetWritable(final boolean writable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeWritable(writable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetReadable(final boolean readable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeReadable(readable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }
@Override protected boolean doSetExecutable(final boolean executable, final boolean ownerOnly) throws Exception { final PosixPermissions permissions = getPermissions(false); final int newPermissions = permissions.makeExecutable(executable, ownerOnly); if (newPermissions == permissions.getPermissions()) { return true; } attrs.setPERMISSIONS(newPermissions); flushStat(); return true; }