next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: applicationDirectory

applicationDirectory -- the path to the user's application directory

Synopsis

Description

The function installPackage, by default, installs packages under the application directory. At program startup, unless the -q option is provided on the command line, an entry will be added to the path so packages can be loaded from there by loadPackage and needsPackage. Moreover, the initialization file, if found there, will be run.

The function applicationDirectorySuffix determines the value of applicationDirectory, and can be modified by the user.

i1 : applicationDirectory()

o1 = /home2/dan/.Macaulay2/

See also

Code

/home2/dan/src/M2/M2/Macaulay2/d/startup.m2.in:253:32-263:16: --source code:
     applicationDirectory = () -> (
          if getenv "HOME" =!= ""
          then (
               getenv "HOME" | "/" |
               -- we allow the user to change applicationDirectorySuffix to a string or a function
               if instance(applicationDirectorySuffix, Function)
               then applicationDirectorySuffix()
               else applicationDirectorySuffix
               )
          else error "environment variable HOME not set"
          );