GOLF(2gg)
β¨ GOLF(2gg) β directories β¨
okay bestie, welcome to the Golf docs for general directories π this is the part of the Development manual where we talk about where stuff lives on your machine. sit down, grab a strawberry π, let's get into it.
πΈ NAME πΈ
directories β Golf documentation (general directories). yes that's the whole name section, she's short and she ate π
π¦ DESCRIPTION π¦
π ROOT DIRECTORY π
ok so. the root directory is the directory where Golf is installed. every single directory path described below gets appended to the root directory. periodt.
when Golf is installed with a system installer β think apt, dnf, zypper, pacman etc. β then the root directory is literally an empty string (""). iconic.
when Golf is installed locally, into a specific directory, that directory is the root. for example, if you installed Golf into your user's home directory, it might be "$HOME/.app/golf". no cap.
if you're using any of the paths below in the absolute form (which, in most cases, you don't need to, since your application's current working directory is the application home directory below), you should first get your root directory (even if it's empty):
get-app root-directory to root
read-file root + "/var/lib/gg/<app name>/app/my-file" to contents
slay. moving on π
π§ APPLICATION DIRECTORY STRUCTURE π§
mgrg will create a Golf directory structure (peep the "-i" option) when you create your application. and listen β while you can keep and compile Golf source files in any directory, the directories used by Golf are always under /var/lib/gg. that's just the vibe.
a Golf application is always owned by a single Operating System user (see the "-u" option in mgrg), while different applications can be owned by different users. it's giving one app, one owner, no drama. here's the directory structure:
/var/lib/gg/bld/<app name>β the Build directory ποΈ is where your application executables are built, with the name<app name>.srvcfor 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 it for anything else. it is created with755privileges./var/lib/gg/<app name>β the Application directory π. all application data, including internals such as sockets, are kept here. it is created with755privileges, while each subdirectory within (see below) is created with700privileges in order to prevent other users (even from the same group) from accessing its files. protective queen behavior π/var/lib/gg/<app name>/appβ the 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 withuniq-filefor instance, or when uploading files. let the app cook π³/var/lib/gg/<app name>/app/traceβ Process tracing is written in per-process files if the"--trace"option is used (seegg). note that a special file"backtrace"is appended to when the program crashes (or when thereport-errorstatement 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. debugging but make it glam β¨/var/lib/gg/<app name>/app/dbβ the Database configuration directory πΎ contains thedatabase-config-filesused by Golf to connect to databases; this directory is maintained by Golf and you should not use it. hands off, bestie π
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
the way that a symlink just solves all your problemsβ¦ obsessed π¦
π SEE ALSO π
Directories
change-dirchange-modedelete-dirdirectoriesnew-dir
General
about-golfdirectoriespermissionsSee all documentation
and that's the whole page, bestie π you now know exactly where every Golf thing lives and why. go forth and ln -s responsibly π«Ά
this page is from Golf version$VERSION, dated$DATE, and she's filed underGOLF(2gg)in the Development manual β periodt βπ
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms