code: public void setAttributes(SftpFile file, SftpFileAttributes attrs)
  			throws SftpStatusException, SshException {
  		if (file.getHandle() == null) {
  			throw new SftpStatusException(SftpStatusException.INVALID_HANDLE,
  					"The handle is not an open file handle!");
  		}
  
  		try {
  			UnsignedInteger32 requestId = nextRequestId();
  			Packet msg = createPacket();
  			msg.write(SSH_FXP_FSETSTAT);
  			msg.writeInt(requestId.longValue());
  			msg.writeBinaryString(file.getHandle());
  			msg.write(attrs.toByteArray());
  
  			sendMessage(msg);
  
  			getOKRequestStatus(requestId);
  		} catch (SshIOException ex) {
  			throw ex.getRealException();
  		} catch (IOException ex) {
  			throw new SshException(ex);
  		}
  	}
docs: Sets the attributes of a file.
  
  @param file
  the file object.
  @param attrs
  the new attributes.
  
  @throws SshException