I need to take the compiled classes and use them in a build process, I
am trying to locate the directories within CFClasses automatically but
know little about how and why the last digits of the file names are
generated. can anyone help?
for example Railo/CFClasses/CFC__Myproject7384
if I could find out where the 7384 comes from it would be a great help
i have somewhere a script, that translate a regular path to this
cfclasses path, give me some time to find it ;-)
/micha
p.s. the numbers makes the name identical, because railo replace all not
us-ascci characters characters with underline and because that the
following 2 example would generate the same path
- /sälü/susi
- /sülö/susi
the number represent the replaced characters and their position
Mark Niland schrieb:
--
Michael Offner-Streit
CTO
Railo Technologies GmbH
michael...@railo.ch
www.getrailo.com
Mailing List (english): http://groups.yahoo.com/group/railo_talk/
Mailing List (german): http://de.groups.yahoo.com/group/railo/
Linked in: http://www.linkedin.com/e/gis/71368/0CF7D323BBC1
Issue Tracker: http://jira.jboss.org/jira/browse/RAILO
Blog: http://www.railo-technologies.com/blog
Hi Marki have somewhere a script, that translate a regular path to this
cfclasses path, give me some time to find it ;-)/micha
p.s. the numbers makes the name identical, because railo replace all not
us-ascci characters characters with underline and because that the
following 2 example would generate the same path
- /sälü/susi
- /sülö/susithe number represent the replaced characters and their position
Mark Niland schrieb:
> Hi Guys
>
> I need to take the compiled classes and use them in a build process, I
> am trying to locate the directories within CFClasses automatically but
> know little about how and why the last digits of the file names are
> generated. can anyone help?
>
> for example Railo/CFClasses/CFC__Myproject7384
>
> if I could find out where the 7384 comes from it would be a great help
>
>
--
Michael Offner-Streit
CTO
Railo Technologies GmbH
this is a one way solution, this means it is impossible to get the original name from the class file name, but of course it is possible the other way around.something like this should work<cfset pc=getPageContext()><!--- first get a absolute path ---><cfset abs=GetCurrentTemplatePath()><cfdump var="#abs#"><!--- contract path to map to a mapping in Railo ---><cfset contract=contractPath(abs)><cfdump var="#contract#"><!--- create/load PageSource for path ---><cfset ps=pc.getRelativePageSource(contract)><cfset mapping=ps.getMapping()><!--- get path to class root and the class file ---><cfset classRoot=mapping.getClassRootDirectory()><cfset classFile=classRoot.getReal(ps.getJavaName())><cfdump var="#classFile#" label="classFile">/micha
if you know all the virtual path then yes.
it would be a much easier when you could translate from class to template.
/micha2012/2/22 Igal
<cfset ofd = CreateObject( 'component', 'UnusedCfFilesDetector' )><cfset unused.Root = ofd.ScanFolderForUnusedCfFiles( '/' )><cfset unused.CFC = ofd.ScanFolderForUnusedCfFiles( '/cfc' )><cfset unused.Test = ofd.ScanFolderForUnusedCfFiles( '/test' )> <!--- add more folders to be scanned as needed ---><cfdump var="#unused#">
It's good tool, but I would like to report few issues/suggestions:
1) If folder cannot be resolved (see below one of the cases), the tool is stuck in infinite loop (resolveFolder method), I think I fixed it;
2) CustomTags (not-default Railo ones) are not added in this.MappingsInvert (because the have VirtualPath with digits). I think getMappingsInvert should be changed to process custom tags separately (not fixed)
3) I think the tool should be recursive by default (check the whole tree), changed in the new revision
4) I changed default mask to "*.cf?|*.cfml". HTML does not contain CFML very often; *.cf* - would return false positive for internal SVN files (when folder is under SVN).
I posted changed version here https://gist.github.com/1895420You can completely ignore it of course :)
1) It happened when I pointed it to a my CustomTags folder. But I think the same thing would happen if you point it to a random folder, outside of Railo-related folders. There is a recursion in the end of the method, so it some point it just enters into a dead loop (at least on Windows env, C: -> C: -> C: or something like that).
3) It actually works pretty fast (timeout can always be increased by passing ?RequestTimeout=NNNNN).
Thank you.