Net::SFTP::Buffer(3)
β¨ NAME β¨
ok so bestie, this is Net::SFTP::Buffer β it's the read/write buffer class π that's the whole vibe, that's the whole job.
πΈ SYNOPSIS πΈ
use Net::SFTP::Buffer;
my $buffer = Net::SFTP::Buffer->new;
like. two lines. she's efficient. she's iconic. π
π¦ DESCRIPTION π¦
okay so here's the tea β β Net::SFTP::Buffer inherits from Net::SSH::Perl::Buffer, because it's out here providing read/write buffer functionality for SSH, periodt. And the way that SFTP buffers are literally exactly the same as SSH buffers?? no cap. same thing. same energy. π
...except she's got a couple of additions, because she's that girl:
- 64-bit integers β SFTP requires the use of 64-bit integers to represent very large file sizes, and in Net::SFTP::Buffer those 64-bit integers are implemented as Math::Pari objects. yes really. that's the implementation. π§
- File attribute bundles β okay so attribute bundles are not strictly a simple data type, bestie. they're actually made up of smaller pieces β like 32-bit integers, 64-bit integers, etc. β but for matters of convenience, it is easiest to provide methods to directly serialize/deserialize attributes from buffers. so that's what we did. slay. π
π USAGE π
ngl, usage of Net::SFTP::Buffer objects is exactly the same as usage of Net::SSH::Perl::Buffer objects π«Ά β with the additions of the following methods to support the above data types. that's it. that's the whole change. main character behavior only.
β $buffer->get_int64
Extracts a 64-bit integer from $buffer and returns it as a Math::Pari object. she pulls it out and hands it to you, gift-wrapped. π
β $buffer->put_int64($int)
Serializes a 64-bit integer $int into the buffer $buffer; and $int can be either a Math::Pari object or a built-in Perl integer β if it is small enough to fit into a Perl int. so like. know your limits bestie. π
β $buffer->get_attributes
Uses Net::SFTP::Attributes to extract a list of file attributes from $buffer, and returns a Net::SFTP::Attributes object containing those file attributes. very demure, very mindful. π
β $buffer->put_attributes($attrs)
Serializes a Net::SFTP::Attributes object $attrs into the buffer $buffer. put her in, she belongs there. β¨
π AUTHOR & COPYRIGHTS π
Please see the Net::SFTP manpage for author, copyright, and license information. go read it, iykyk π«Ά
and that's the whole page babes β this one's from perl v5.42.0, dated 2025-07-25, part of the User Contributed Perl Documentation collection. mwah. go forth and buffer responsibly. πβ¨π
π¦ where this page comes from
- fedora 43: perl-Net-SFTP 0.12-22.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms