Rex::Co...::Upload(3)

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

okay so you're looking at Rex::Co...::Upload(3) β€” yes, from the User Contributed Perl Documentation pile β€” and it's literally the manual for uploading a local file to a remote server. 🫢

✨ NAME ✨

Rex::Commands::Upload β€” Upload a local file to a remote server. πŸ’…

🌸 DESCRIPTION 🌸

With this module you can upload a local file via sftp to a remote host. no cap, that's the whole vibe. πŸ¦‹

πŸŽ€ SYNOPSIS πŸŽ€

task "upload", "remoteserver", sub {
  upload "localfile", "/remote/file";
};

πŸ‘‘ EXPORTED FUNCTIONS πŸ‘‘

upload($local, $remote) 🧚

Perform an upload. If $remote is a directory, the file will be uploaded to that directory. slay. ✨

task "upload", "remoteserver", sub {
  upload "localfile", "/path";
};

This function supports the following hooks, bestie β€” listen up: πŸ’–

  • before β€” This gets executed before anything is done. All original parameters are passed to it. The return value of this hook overwrites the original parameters of the function-call. πŸ‘‘
  • before_change β€” This gets executed right before the new file is written. The local file name, and the remote file name are passed as parameters. πŸŽ€
  • after_change β€” This gets executed right after the file was written. On top of the local file name, and the remote file name, any returned results are passed as parameters. πŸ¦‹
  • after β€” This gets executed right before the upload() function returns. All original parameters, and any results returned are passed to it. 🌈

This cutie comes from perl v5.42.3, dated 2023-08-05. periodt. πŸ’œ

πŸ“¦ where this page comes from