On Mon, 2009-12-14 at 15:03 -0500, Dale Worley wrote: > > What are the semantics? In particular, can one specify a directory and > > all of the files in all of the subdirectories?
On Mon, 2009-12-14 at 15:19 -0500, Scott Lawrence wrote: > My thinking is/was that subdirectories should be specified separately, > so for example: > > <directory> > <path>/etc/sipxpbx/foo</path> > <filepattern>*.xml</filepattern> > <filepattern>*.wav</filepattern> > </directory> > <directory> > <path>/etc/sipxpbx/foo/bar</path> > <filepattern>*.abc</filepattern> > </directory> > <directory> > <path>/etc/sipxpbx/foo/bingo</path> > <filepattern>*.xyz</filepattern> > </directory> > > allows three directories, each of which has a set of suffixes it allows. > The '*' in the filepatterns should match anything but '/', '.', and > '..', the way shell file globs do (I don't think we need to support any > richer pattern primitive than that at this time). See attached patch for my suggested addition to the process definition schema for this.
commit 19e4d88be8dfdb70e7899413129d9f0461c5cb63 Author: Scott Lawrence <[email protected]> Date: Mon Dec 14 17:28:56 2009 -0500 add directory resources to supervisor process definition schema diff --git a/sipXsupervisor/meta/sipXecs-process.xsd.in b/sipXsupervisor/meta/sipXecs-process.xsd.in index f888e4b..3850575 100644 --- a/sipXsupervisor/meta/sipXecs-process.xsd.in +++ b/sipXsupervisor/meta/sipXecs-process.xsd.in @@ -293,6 +293,7 @@ <element ref='proc:imdb'/> <element ref='proc:process'/> <element ref='proc:sqldb'/> + <element ref='proc:directory'/> </choice> </sequence> </complexType> @@ -338,4 +339,49 @@ </annotation> </element> + <element name='directory'> + <complexType name='DirectoryResource'> + <annotation> + <documentation> + Describes a directory used by a process. + The single required path element provides the path to the + directory. + Each filePattern element provides the pattern for a file name that + may exist in the directory. + If the 'required' attribute is 'true' on a directory element, + then the path must exist for the service to be started; if 'false', + then the path need not exist to start the process. + If 'required' is false, and 'configAccess' is 'read-write', then + the supervisor may create the directory when a file is written to + it. + </documentation> + </annotation> + <sequence> + <element ref='proc:path' minOccurs='1' maxOccurs='1'/> + <element ref='proc:filePattern' minOccurs='1' maxOccurs='unbounded'/> + </sequence> + <attributeGroup ref='proc:ResourceAttributes'/> + </complexType> + </element> + + <element name='path' type='normalizedString'> + <annotation> + <documentation> + Content is the full path to a directory (it should not end with a '/'). + </documentation> + </annotation> + </element> + + <element name='filePattern' type='normalizedString'> + <annotation> + <documentation> + Content is a pattern expression that matches potential file names. + The content may consist of any legal file name character ('/' is + forbidden). + The character '*' represents any sequence of file name + characters that does not begin with '.' and does not contain '/'. + </documentation> + </annotation> + </element> + </schema>
_______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
