[kepler-dev] DirectoryListing actor update

Christopher Brooks cxh at eecs.berkeley.edu
Wed Jul 14 16:35:18 PDT 2010


On 7/14/10 3:41 PM, Jianwu Wang wrote:
> Hi Christopher,
>
> I'm using DirectoryListing actor
> (ptolemy/src/ptolemy/actor/lib/io/DirectoryListing.java) in one project.
> It works well but will throw exception when the directory is empty. I
> think we often need to list some directories without knowing they are
> empty or not. Sometimes, we want to just ignore the empty directories
> (namely no output for empty directories), rather than throwing exceptions.
> So I extended the class to have one more parameter called
> 'allowEmptyDir' and its default value is 'false'. If users choose this
> parameter, the actor will not throw exceptions.
> I attached the updated class. Please have a look and check it in ptolemy
> trunk if you think it is feasible. Thanks.
>

Hi Jianwu,
Thanks, I merged in your changes to DirectoryListing.  One thing I changed
was the name of the parameter from allowEmptyDir to allowEmptyDirectory
as we don't use appreviations in Ptolemy parameter names.

I also created a couple of tests and added you as a contributor to
that file.

Note that to get the change you will need to update
kepler/ptolemy/module-info/revision.txt to 58597.
This should happen automatically, but there is a bug that is not
updating the ptolemy revision number.

_Christopher

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841 fax:510.642.2718	      (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670


More information about the Kepler-dev mailing list