What is the best way to check if a file is present in a file system?
I store XML files on a disk (I use the web app resource manager) and need to build a different XForms model, depending on the presence/absence of the resource. I tried to use the URL generator with dynamically-built content of the "url" element of the config, but this is not good approach as the resource manager throws an error if resource is not found. Any ideas? Thanks Alex. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
I'm not saying this is ideal, but you could perhaps
use the directory scanner to build a document with all the files, then your conditional statement can test for a file in that document. http://www.orbeon.com/ops/doc/processors-directory-scanner You could build the document within a scope generator, not with every request. --Hank ----- Original Message ----- From: "Alexander Zatko" <[hidden email]> To: <[hidden email]> Sent: Thursday, December 08, 2005 11:18 AM Subject: [ops-users] checking availability of resource > What is the best way to check if a file is present in a file system? > > I store XML files on a disk (I use the web app resource manager) and > need to build a different XForms model, depending on the > presence/absence of the resource. I tried to use the URL generator with > dynamically-built content of the "url" element of the config, but this > is not good approach as the resource manager throws an error if > resource is not found. > > Any ideas? > > Thanks > > Alex. > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Thanks Hank. Works like a charm.
A. On Dec 8, 2005, at 5:24 PM, Hank Ratzesberger wrote: > I'm not saying this is ideal, but you could perhaps > use the directory scanner to build a document with all the files, then > your conditional statement can test for a file in that document. > > http://www.orbeon.com/ops/doc/processors-directory-scanner > > You could build the document within a scope generator, > not with every request. > > --Hank > > ----- Original Message ----- From: "Alexander Zatko" <[hidden email]> > To: <[hidden email]> > Sent: Thursday, December 08, 2005 11:18 AM > Subject: [ops-users] checking availability of resource > >> What is the best way to check if a file is present in a file system? >> I store XML files on a disk (I use the web app resource manager) and >> need to build a different XForms model, depending on the >> presence/absence of the resource. I tried to use the URL generator >> with dynamically-built content of the "url" element of the config, >> but this is not good approach as the resource manager throws an error >> if resource is not found. >> Any ideas? >> Thanks >> Alex. > > > -- > You receive this message as a subscriber of the > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |