Class URLDirectoryReader

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    @Deprecated
    public class URLDirectoryReader
    extends URLReader
    Deprecated.
    Use DirectoryListing instead.
    This actor reads a URL and if the URL names a directory, it outputs the name of each file or subdirectory contained in the directory. If the URL names a file, then it outputs the name of that file.

    If the repeat flag is true, then the sequence of file names is repeated indefinitely. If the refresh flag is true, and the repeat flag is true, then the directory is re-read before repeating the sequence of files and subdirectories.

    If the endsWith String parameter is non-null and non-empty, then only file names or subdirectories that end with the value of the endsWith parameter are output.

    One alternative implementation would be that if the URL named a file, then the actor would output the names of the files and subdirectories in the directory that contains the file.
    Another alternative implementation would output the names of the files and subdirectories in an array.
    An extension would be to include a filter parameter that could be a regular expression that would allow us to filter the file names.
    Should this actor extend URLReader or SequenceActor?

    Since:
    Ptolemy II 2.0
    Version:
    $Id$
    Author:
    Christopher Hylands
    Pt.AcceptedRating:
    Red (liuj)
    Pt.ProposedRating:
    Red (liuj)
    • Field Detail

      • endsWith

        public Parameter endsWith
        Deprecated.
        If non-null and non-empty, then only output file names and sub directories that end with this String value. The default value of this parameter is the empty String "".
      • repeat

        public Parameter repeat
        Deprecated.
        Repeat after outputting all elements of the directory. The default value of this parameter is a false BooleanToken.