Directories

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 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:
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


Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.