title: Java: HDFS copy directory
body: <p>Is there a simple way to copy a HDFS directory to another directory in Java?</p>
  <p>For example, how would I move the contents of /user/abc/pudding to /user/def/pudding?</p>
  <p>I'm looking for some HDFS equivalent to UNIX's cp command which I can do programmatically with Java.</p>
  <p><strong>Note:</strong> I'm aware of <a href="http://hadoop.apache.org/docs/stable/api/org/apache/hadoop/fs/FileSystem.html" rel="nofollow noreferrer">FileSystem</a> but it only seems to allow me to copy from my local machine to HDFS?</p>