Hard to recommend for sure, but, in theory, FileExists() should fail until
another app finish its work and close the file.
So, you can loop and wait until "file exists". You also could try CFFILE
Action="read", if FileExists() doesn't help.
BKBK - 29 Apr 2006 10:28 GMT
You could use locks, thus
<!--- for PDF documents at application level, with access to all users --->
<cflock name="pdfLock" timeout="6" type="EXCLUSIVE">
<!--- ...creating a PDF file with CFHTTP (a third party tool is creating it) I
need to know when the file which is located in the same folder is done
creating. Normally it doesn't take but 3-4 seconds --->
</cflock>
<cflock name="pdfLock" timeout="2" type="READONLY">
<!--- use CFLOCATION is direct the user to the PDF file --->
</cflock>
<!--- for PDF documents at session level, with access to the current user--->
<cflock scope="session" timeout="6" type="EXCLUSIVE">
<!--- ...creating a PDF file with CFHTTP (a third party tool is creating it) I
need to know when the file which is located in the same folder is done
creating. Normally it doesn't take but 3-4 seconds --->
</cflock>
<cflock scope="session" timeout="2" type="READONLY">
<!--- use CFLOCATION is direct the user to the PDF file --->
</cflock>
Neo Rye - 29 Apr 2006 17:16 GMT
I wasn't looking for an alphabetical list, just trying to get to the inner most
nested struct the quickest. In you example, how would I get the value of
employee.phone.office.ext without previousley knowing that phone.office.ext
existed and I only know about employee. I could iterate over it with some type
of iterator hasNext(), but was wondering if there was a quicker way.
<cfset employee.name.first = "Mary">
<cfset employee.name.last = "Smith">
<cfset employee.position = "Boss">
<cfset employee.phone.home = "111-2222-33333">
<cfset employee.phone.office.ext = "444">
<cfset employee.phone.office.number>
BKBK - 29 Apr 2006 17:37 GMT
Oh, so you require the value of the "deepest" key(s) in the structure. The
only method I know of is indeed to iterate across the keys/substructures,
perhaps posing a question with isStruct() at every stage.