1!:43 y Query Current Working Directory 1!:44 y Set Current Working Directory
USERFOLDERS_j_ +--------+------------------------+-+ |Projects|~user\projects |0| +--------+------------------------+-+ |User |~user |0| +--------+------------------------+-+ |System |~system |0| +--------+------------------------+-+ |Addons |~addons |0| +--------+------------------------+-+A subfolder is a folder that is a subdirectory of another folder in USERFOLDERS_j_. It is intended for use in Project Manager, to make it easy to work with subsets of large projects. Project Manager treats subfolders like ordinary folders except that when saving the project, the project folder name used is that of the parent folder. For example, when working with the J library source, a folder name Source should be defined. Then if working only with the source for plot, you can defined a subfolder Plot to point to the plot subdirectories. For example:
+------+-----------------+-+ |LTsrc |c:\lt\source |0| +------+-----------------+-+ |LTrel |c:\lt\release |0| +------+-----------------+-+ |JPB |d:\jss\jpb\source|0| +------+-----------------+-+ |JST |d:\jst\source |0| +------+-----------------+-+ |JSTdev|d:\jst\dev |0| +------+-----------------+-+Note that some paths in the default USERFOLDERS table are the same as in the SYSTEMFOLDERS table. This is intentional, nevertheless you are free to remove or modify such entries in USERFOLDERS. To avoid conflicts between the folder names (first column) in the two tables, we suggest that you use an initial capital letter in the folder names of USERFOLDERS, since folder names in SYSTEMFOLDERS are all lowercase.
jpath converts argument to a full path name jcwdpath return current working directory jhostpath convert separators in filename to host operating systemThese verbs are used to provide the full pathname for files, and to ensure that the path separator is correct for the host operating system. For example:
jpath '~system\main\dates.ijs' c:\j602\system\main\dates.ijs jhostpath 'system\main/dates.ijs' NB. in Windows system\main\dates.ijs jcwdpath '' c:\j602 jcwdpath 'system\main' C:\j602\system\main
jpath '~temp' c:\j602-user\temp jpath '~temp\t2.ijs' c:\j602-user\temp\t2.ijs jpath '~JPB\classes\board\init.ijs' d:\jss\jpb\source\classes\board\init.ijsWhere the folder name is preceded with ~., for example ~.Mywork, this refers to the corresponding parent directory, for example:
jpath '~.JPB\dev\regtest.ijs' d:\jss\jpb\dev\regtest.ijs jpath '~..JPB\release\pbr.ijs' d:\jss\release\pbr.ijsVerb jpath also converts path separators to the current path separator, and so can be used instead of jhostpath (which is still supported).
load '~JPB\classes\board\init.ijs' require '~user\projects\run\run.ijs'
The conversion process:
Existing names in a project are not converted. Therefore you can edit the project file to replace any ~path name with a full filename, and this will be preserved.
Earlier versions of Project Manager stored some names as a relative path name, starting from the J executable directory. Such names are converted to ~path form.
The Look In combobox in Project Manager displays entries in USERFOLDERS, except those pointing to the J system directory. The reason for the exclusion is that projects should not be developed in the J system directory.