EMILUA(3em)

πŸ“¦ version 0.12.1, in nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

Emilua β€” the Lua execution engine. Yes bestie, this is the EMILUA(3em) manual page, and we're about to get into some fs.copy energy. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

local fs = require "filesystem"
fs.copy(from: fs.path, to: fs.path[, opts: table])

🌸 DESCRIPTION 🌸

Okay so the full tea is over at https://en.cppreference.com/w/cpp/filesystem/copy. Go read that if you need the deep lore, iykyk. πŸ’…

πŸŽ€ opts πŸŽ€

Here's the whole menu for the opts table, no skips. ✨

  • existing β€” "skip" | "overwrite" | "update" | nil β€” behavior when the file already exists.
    • nil β€” report an error. 😭
    • "skip" β€” keep the existing file, without reporting an error. πŸ’–
    • "overwrite" β€” replace the existing file. πŸ”₯
    • "update" β€” replace the existing file only if it is older than the file being copied. ⏳
  • recursive β€” boolean = false
    • false β€” skip subdirectories. πŸ™ˆ
    • true β€” recursively copy subdirectories and their content. πŸŒ€
  • symlinks β€” "copy" | "skip" | nil
    • nil β€” follow symlinks. πŸ‘€
    • "copy" β€” copy symlinks as symlinks, not as the files they point to. πŸͺž
    • "skip" β€” ignore symlinks. 🚫
  • copy β€” "directories_only" | "create_symlinks" | "create_hardlinks" | nil
    • nil β€” copy file content. πŸ“„
    • "directories_only" β€” copy the directory structure, but do not copy any non-directory files. πŸ“
    • "create_symlinks" β€” instead of creating copies of files, create symlinks pointing to the originals. πŸ”—
    • "create_hardlinks" β€” instead of creating copies of files, create hardlinks that resolve to the same files as the originals. 🧲

Bestie, that's the whole page. Stay iconic. πŸ’…βœ¨

This page was brought to you by source/version Emilua 0.12.1-nixpkgs1, dated 1980-01-01. πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from