Provided by: golf_601.4.41-1_amd64 bug

NAME

       directories - Golf documentation (general directories)

DESCRIPTION

       ROOT DIRECTORY

       Root  directory  is a directory where Golf is installed. All directory paths described below are appended
       to the root directory.

       When Golf is installed with a system installer (such  as  apt,  dnf,  zypper,  pacman  etc.),  then  root
       directory  is  an  empty  string  ("").  When  Golf is installed locally, into a specific directory, this
       directory is the root (for example, if you installed Golf into your user's home directory,  it  might  be
       "$HOME/.app/golf").

       If you are using any of the paths below in the absolute form (which in most cases you don't need to since
       your  applications  current  working directory is the application home directory below), you should first
       get your root directory (even if empty):

           get-app root-directory to root
           read-file root + "/var/lib/gg/<app name>/app/my-file" to contents

       APPLICATION DIRECTORY STRUCTURE

       mgrg will create a Golf directory structure (see "-i" option) when you create your application. While you
       can keep and compile Golf source files in any directory, the directories used by Golf  are  always  under
       /var/lib/gg directory.

       A  Golf  application  is  always owned by a single Operating System user (see "-u" option in mgrg), while
       different applications can be owned by different users. This is the directory structure:

           • /var/lib/gg/bld/<app name> Build directory is where your application executables  are  built,  with
           name  <app  name>.srvc for a service and <app name> for a command-line program. This is a scratch-pad
           directory, so do not alter files in it, or use for anything else. It is created with 755 privileges.

           • /var/lib/gg/<app name> Application directory. All application data,  including  internals  such  as
           sockets, are kept here. It is created with 755 privileges, while each subdirectory within (see below)
           is  with 700 privileges in order to prevent other users (even from the same group) from accessing its
           files.

           • /var/lib/gg/<app name>/app Application home directory. This is the current working  directory  when
           your application runs. Copy/move here any files and directories your application needs.

           • /var/lib/gg/<app name>/app/file This is file-storage used for uploads and new document creation. Do
           not  write  there  directly;  Golf  does  that  for you, such as with uniq-file for instance, or when
           uploading files.

           • /var/lib/gg/<app name>/app/trace Process tracing is  written  in  per-process  files  if  "--trace"
           option is used (see gg). Note that a special file "backtrace" is appended to when program crashes (or
           report-error  statement  is  used),  and this file shows a full source backtrace, allowing for easier
           debugging. You can use "--c-lines" in order to show the source code lines of the  generated  C  code,
           instead of Golf code.

           •  /var/lib/gg/<app  name>/app/db Database configuration directory contains the database-config-files
           used by Golf to connect to databases; this directory is maintained by Golf and you should not use it.

       While Golf directories are fixed, you can effectively change their location by creating a soft link. This
       way, your directories and files can be elsewhere, even on a different disk. For example,  to  house  your
       file storage on a different disk:

           ln -s /home/disk0/file /var/lib/gg/<app name>/app/file

SEE ALSO

        Directories

       change-dir change-mode delete-dir directories new-dir
        General

       about-golf directories permissions See all documentation

$DATE                                               $VERSION                                           GOLF(2gg)