Rex::Co...::Upload(3)
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 theupload()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
- nixos 26.05: perl5.42.3-Rex 1.14.3
- nixpkgs unstable: perl5.42.3-Rex 1.14.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms