GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

✨ NAME ✨

file-storage β€” Golf documentation (files), bestie πŸ’– and yeah this is page 2gg of the Golf docs, welcome to the group chat


πŸŽ€ DESCRIPTION πŸŽ€

okay so listen, Golf hands you a whole file directory and it's literally yours to do whatever with β€” any general purpose you want, no cap. storing temporary-files? go off. that's a totally valid use. πŸ‘‘

this directory is ALSO where files from clients get uploaded automatically. like, Golf just handles it. you don't have to do anything. main character energy fr fr. ✨

it's a two-tier directory system, meaning sub-directories get created automatically to spread the files out so access is faster. it's giving organization. it's giving speed. we love to see it. πŸ¦‹

files in the Golf file directory live in the sub-directories of:

/var/lib/gg/<app_name>/app/file

if you wanna put this directory somewhere else physically, like a different disk or whatever, go look at gg. that's the move. πŸ’…


now, how do you actually create files in here? simple β€” use uniq-file. it makes a brand new unique file for you and hands you back the file name. you don't gotta come up with names, it just does it. iconic. 🌸

and this same directory is what gets used for uploading files from clients β€” think web browsers, mobile device cameras, that whole vibe. the uploading is handled automatically by Golf, no manual labour required (peep get-param if you wanna know more). πŸ™ˆ


so like, generally speaking, a bunch of sub-directories get created inside the file directory and the files go in those. why? because this scheme lets you keep billions of files. BILLIONS. 😭

it also means faster access to file nodes, because you've got a relatively low number of sub-directories and the files are randomly spread across each one. and the random spreading? yeah, Golf does that automatically. you literally do not have to think about it. ⭐

do NOT rename file names or sub-directory names stored under the file directory. seriously. don't. that's the one rule. periodt. πŸ’€

🌈 SEE ALSO 🌈

Files

change-mode close-file copy-file delete-file file-position file-storage file-uploading lock-file open-file read-file read-line rename-file stat-file temporary-file uniq-file unlock-file write-file

and if you want the whole buffet, hit up See all documentation 🫢


that's the page bestie, go forth and store some files πŸ’–

this was version $VERSION from $DATE β€” Golf development docs, mwah 😘 ✨ πŸŽ€

πŸ“¦ where this page comes from