GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

🌸 NAME 🌸

copy-file β€” the file-duplicating icon of the GOLF(2gg) manual, Development section πŸ’… (she lives in the files category, iykyk)


✨ PURPOSE ✨

Copies one file to another. That's the whole assignment, and bestie ate β€” no notes. πŸ‘‘


πŸŽ€ SYNTAX πŸŽ€

copy-file <source file> to <target file> [ status <status> ]

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically: your <source file> gets copied into <target file>, and if <target file> doesn't exist yet, it gets created for you. Not her manifesting it, she just does it. ✨

And the tea on status? You can catch it in the <status> variable, and here's the whole vibe check on what it can be πŸ‘‡

  • GG_ERR_OPEN β€” she could not open the source file 😭
  • GG_ERR_CREATE β€” she could not create the target file πŸ’€
  • GG_ERR_READ β€” she could not read the source file 🫠
  • GG_ERR_WRITE β€” she could not write the target file πŸ™ˆ
  • the number of bytes copied (including 0) β€” this is the success case, and yes, zero is a valid slay πŸŽ‰

🌈 EXAMPLES 🌈

Lowkey the cutest little invocation, watch:

copy-file "/home/user/source_file" to "/home/user/target_file" status st

πŸ‘‘ 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
  • See all documentation

Okay that's the whole page, bestie, you're officially fluent πŸ’œ This was version $VERSION, dated $DATE, straight out of the GOLF(2gg) manual β€” go forth and copy those files, no cap πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from