Directory Paths in J
1!:43 y Query Current Working Directory
1!:44 y Set Current Working Directory
JFE defines BINAPTH_z_ as the full path to the J bin folder that contains JFE, JE, and profile.ijs.
profile.ijs, before it boots up the rest of the standard library, defines SystemFolders_j_ as a 2-column table of folder names and paths.
UserFolders_j_ is a similar table defined from the user's configuration script config.ijs. As much as possible it should be defined relative to the names in SystemFolders_j_. UserFolder names should start with an upper-case letter.
The profile defines the following verbs in the z locale:
jpath converts argument to a full path name
jcwdpath return path in current working directory
These verbs are used to provide the full pathname for files, and to ensure that the path separator is correct for the host operating system.
Verb jpath references the folder tables. It converts strings with folder names preceded with ~, for example ~Mywork. The folder name is read up to the first path separator or the end, for example:
Where the folder name is preceded with ~., for example ~.Mywork, this refers to the corresponding parent directory, for example:
Verbs load, require and script call jpath, and so recognize ~path names, e.g.