@Override public void setattr(String path, FileAttributes attrs) throws IOException { super.setattr(cwdify(path), attrs); }
public void chmod(String path, int perms) throws IOException { setattr(path, new FileAttributes.Builder().withPermissions(perms).build()); }
public void truncate(String path, long size) throws IOException { setattr(path, new FileAttributes.Builder().withSize(size).build()); }
public void chgrp(String path, int gid) throws IOException { setattr(path, new FileAttributes.Builder().withUIDGID(uid(path), gid).build()); }
public void chown(String path, int uid) throws IOException { setattr(path, new FileAttributes.Builder().withUIDGID(uid, gid(path)).build()); }
@Override public void setattr(String path, FileAttributes attrs) throws IOException { super.setattr(cwdify(path), attrs); }
@Override public void setattr(String path, FileAttributes attrs) throws IOException { super.setattr(cwdify(path), attrs); }
public void chmod(String path, int perms) throws IOException { setattr(path, new FileAttributes.Builder().withPermissions(perms).build()); }
public void truncate(String path, long size) throws IOException { setattr(path, new FileAttributes.Builder().withSize(size).build()); }
public void chmod(String path, int perms) throws IOException { setattr(path, new FileAttributes.Builder().withPermissions(perms).build()); }
public void truncate(String path, long size) throws IOException { setattr(path, new FileAttributes.Builder().withSize(size).build()); }
public void chown(String path, int uid) throws IOException { setattr(path, new FileAttributes.Builder().withUIDGID(uid, gid(path)).build()); }
public void chgrp(String path, int gid) throws IOException { setattr(path, new FileAttributes.Builder().withUIDGID(uid(path), gid).build()); }
public void chown(String path, int uid) throws IOException { setattr(path, new FileAttributes.Builder().withUIDGID(uid, gid(path)).build()); }
public void chgrp(String path, int gid) throws IOException { setattr(path, new FileAttributes.Builder().withUIDGID(uid(path), gid).build()); }
@Override public Void create() throws Exception { final AtomicReference<InputStream> inputStreamRef = new AtomicReference<InputStream>(); sftp = acquire(sftpConnection); try { sftp.put(new InMemorySourceFile() { @Override public String getName() { return path; } @Override public long getLength() { return length; } @Override public InputStream getInputStream() throws IOException { InputStream contents = contentsSupplier.get(); inputStreamRef.set(contents); return contents; } }, path); sftp.chmod(path, permissionsMask); if (lastAccessDate > 0) { sftp.setattr(path, new FileAttributes.Builder() .withAtimeMtime(lastAccessDate, lastModificationDate) .build()); } } finally { closeWhispering(inputStreamRef.get(), this); } return null; }
sftp.setattr(path, new FileAttributes.Builder() .withAtimeMtime(lastAccessDate, lastModificationDate) .build());