Click here to get back home

Net::SFTP::Attributes

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Net::SFTP::Attributes bmaynard 10-23-2006
Posted by bmaynard on October 23, 2006, 11:56 am
Please log in for more thread options


Does anyone know how to handle a Net::SFTP::Attributes object? An
example would be awesome if anyone can provide?

Thanks

Ben


Posted by Paul Lalli on October 23, 2006, 1:10 pm
Please log in for more thread options


bmaynard@geekserv.com wrote:
> Does anyone know how to handle a Net::SFTP::Attributes object? An
> example would be awesome if anyone can provide?

What was wrong with the descriptions and example you found when you
looked up the documentation to the module?

http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP/Attributes.pm

Paul Lalli


Posted by bmaynard on October 23, 2006, 1:23 pm
Please log in for more thread options


The information in the documentation is very terse, and really doesn't
give a good description on how to handle the data or at least a
description on what format it is stored in.


Paul Lalli wrote:
> bmaynard@geekserv.com wrote:
> > Does anyone know how to handle a Net::SFTP::Attributes object? An
> > example would be awesome if anyone can provide?
>
> What was wrong with the descriptions and example you found when you
> looked up the documentation to the module?
>
> http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP/Attributes.pm
>
> Paul Lalli


Posted by Paul Lalli on October 23, 2006, 2:53 pm
Please log in for more thread options


bmaynard@geekserv.com wrote:
> Paul Lalli wrote:
> > bmaynard@geekserv.com wrote:
> > > Does anyone know how to handle a Net::SFTP::Attributes object? An
> > > example would be awesome if anyone can provide?
> >
> > What was wrong with the descriptions and example you found when you
> > looked up the documentation to the module?
> >
> > http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP/Attributes.pm
> The information in the documentation is very terse, and really doesn't
> give a good description on how to handle the data or at least a
> description on what format it is stored in.

I don't at all understand what you're getting at. The documentation is
"terse" because there's very little to say about it. There's nothing
complicated. The size() method returns the size (a number of bytes).
The atime() method returns the last access time of the file (a number,
I'm sure. Presumably seconds since the epoch, like stat() itself
returns. A simple printing of that value would confirm it.

Can you be any more specific about what parts you don't understand?
You've twice now used the term "handle", which has no meaning in this
realm. What do you want to do with the data, and how are you being
prevented from doing it?

Paul Lalli


Posted by bmaynard on October 23, 2006, 3:20 pm
Please log in for more thread options


Okay you are right perhaps an example would help. I am doing this:

my @files = @{ $sftp->ls( $conf ) };

foreach my $ref ( @files )
{
next if $ref-> eq "." || $ref-> eq "..";
print $ref-> . "\n"
}


However, no matter what I do dealing with $ref always seems to be
empty. When I refer to 'handle' I mean how I am supposed to handle the
object I am not referring to file handles or any other type of handle,
just the fact that I have data coming in, but I am not sure how I can
get my script to handle the data since there I don't seem to be able to
access the contents of the Net::SFTP::Attributes object.

Paul Lalli wrote:
> bmaynard@geekserv.com wrote:
> > Paul Lalli wrote:
> > > bmaynard@geekserv.com wrote:
> > > > Does anyone know how to handle a Net::SFTP::Attributes object? An
> > > > example would be awesome if anyone can provide?
> > >
> > > What was wrong with the descriptions and example you found when you
> > > looked up the documentation to the module?
> > >
> > > http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP/Attributes.pm
> > The information in the documentation is very terse, and really doesn't
> > give a good description on how to handle the data or at least a
> > description on what format it is stored in.
>
> I don't at all understand what you're getting at. The documentation is
> "terse" because there's very little to say about it. There's nothing
> complicated. The size() method returns the size (a number of bytes).
> The atime() method returns the last access time of the file (a number,
> I'm sure. Presumably seconds since the epoch, like stat() itself
> returns. A simple printing of that value would confirm it.
>
> Can you be any more specific about what parts you don't understand?
> You've twice now used the term "handle", which has no meaning in this
> realm. What do you want to do with the data, and how are you being
> prevented from doing it?
>
> Paul Lalli


Similar ThreadsPosted
Help with Net::SFTP when sftp on unix works. September 21, 2004, 11:14 am
XML::XSLT not recognizing attributes January 14, 2005, 2:08 pm
Net::SFTP installation January 12, 2005, 11:35 pm
Net::SFTP on Windows March 21, 2005, 9:55 pm
problem using Net::SFTP with pubkey September 1, 2005, 4:29 am
Net::SFTP port problem July 26, 2004, 2:18 pm
Net::SFTP transfer speed December 14, 2004, 8:14 am
Aargh. SFTP problems March 15, 2005, 2:35 pm
net::sftp connection close May 4, 2006, 6:27 am
NET::SFTP - how to close connection September 28, 2006, 7:22 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap