Add a directory argument for the REPL
Description
Gliffy Diagrams
Activity
Show:
Brad Wood October 13, 2015 at 5:57 AMEdited
Note,
will always point to the folder where the CommandBox bootstrap.cfm file since the path that "" resolves to can't be changed during a request. However, CFC instantiation is now rooted in the current working directory. Also, functions like
from the repl will return the CWD, or at least the directory that the REPL was started from.
Eric Peterson October 5, 2015 at 9:31 PMEdited
I submitted a pull request for this issue here: https://github.com/Ortus-Solutions/commandbox/pull/50
I would like to set a working directory path in the REPL to be able to instantiate objects from within the REPL, so I need to be able to set the home directory of the REPL. Doing this:
CFSCRIPT-REPL: expandpath( "./");
=> "/Users/rmunn/.CommandBox/cfml/system/"
shows where the REPL is running from, and you can instantiate objects:
CFSCRIPT-REPL: uri = createObject( "java", "java.net.URI");
CFSCRIPT-REPL: writeDump( uri );
A directory argument would allow you to instantiate objects from any project, and that would be great.