title: How to collect output of a custom phing task in a phing property?
body: <p><strong>Background</strong></p>
  
  <p>I started with this open ended question <a href="https://stackoverflow.com/questions/36602830/list-differences-between-two-directories-from-point-of-view-of-one-directory-by">https://stackoverflow.com/questions/36602830/list-differences-between-two-directories-from-point-of-view-of-one-directory-by</a></p>
  
  <p>Then tried this to solve it using phing's native utilities, but got stuck - <a href="https://stackoverflow.com/questions/36618678/how-to-return-a-value-from-a-phing-target">How to return a value from a phing target?</a></p>
  
  <p><strong>Now I am trying</strong> to write a custom Phing task, as per <a href="https://www.phing.info/docs/guide/trunk/ch06s06.html" rel="nofollow noreferrer">https://www.phing.info/docs/guide/trunk/ch06s06.html</a>. I tried echoing the list of files in this,  with an intention to somehow collect the same in a property when the task is called from the build xml - </p>
  
  <pre><code>&lt;addedfiles message="Hello World" outputProperty="output"/&gt;
  </code></pre>
  
  <p>But I found that an <code>outputProperty</code> attribute is not supported in the call from the build xml file.</p>
  
  <p>Any pointers on how to do this, or to the other two questions would help a lot.</p>