These are called "SystemFolders_j_" and "UserFolders_j_" in J7 onward.  I
update "UserFolders" myself.  There's also a handy noun "Public_j_" which
is a two-column table (name;path) that "load" references to allow using
short names for scripts.  This lets me do something like
   load 'bkp'
to load my backup script without having to remember where it is on a given
machine/OS/J version.


On Thu, Apr 4, 2013 at 3:38 PM, bob therriault <[email protected]>wrote:

> Hey Ian,
>
> I am way over my head on this, but within J, I think that you may want to
> take a look at jpath_j_ and SYSTEMFOLDERS_j_  It looks to me as if
> SYSTEMFOLDERS, USERFOLDERS is set during the boot.ijs process. Perhaps you
> can override the default with a startup script? In J602 you can change the
> folders within the edit>configure menu, but I don't think that would work
> for an independent app.
>
> Hope this helps
>
> Cheers, bob
>
> On 2013-04-04, at 12:30 PM, Raul Miller wrote:
>
> > ~user is the unix shell convention for referring to the home directory
> > of the user named 'user'.
> >
> > ~ by itself (or followed by a slash) is unix shell convention for
> > referring to the current user's home directory.
> >
> > Note however that these only work in contexts where shell wildcards
> > are interpreted -- you could run a subshell from J if you wanted that:
> >
> >   2!:0 'echo ~'
> >
> > Another convention for referring to the current user's home directory
> > is to refer to the environmental variable named HOME
> >
> >   2!:5 'HOME'
> >
> > Of course, both of these would fail on windows.
> >
> > FYI,
> >
> > --
> > Raul
> >
> >
> > On Thu, Apr 4, 2013 at 3:12 PM, Ian Clark <[email protected]> wrote:
> >> The pith's going soft here...
> >>
> >> How do I find the logged-on user's home directory on the Mac?
> >> (I'm still using j602 for this.)
> >>
> >> Hitherto I've been using: jpath '~user'
> >> ...but if I create a MacOS app, with its own embedded J, and dropped it
> >> into /Applications (the proper place for it), then what jpath'~user'
> gives
> >> me is:
> >> /Applications/belcan.app/Contents/MacOS/user
> >>
> >> viz it can't see outside the "bundle".
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to