WWW::Yahoo::Briefcase::Object - contains information about a file or folder



NAME

WWW::Yahoo::Briefcase::Object - contains information about a file or folder


SYNOPSIS

  require WWW::Yahoo::Briefcase::Object;
  my $file =
    WWW::Yahoo::Briefcase::Object->new(
                                       location => '/',
                                       name => 'File',
                                       type => '.txt',
                                       size => 12345, # bytes
                                       time => 1060066800, # 5-Aug-2003
                                      );
  my $folder =
    WWW::Yahoo::Briefcase::Object->new(
                                       location => '/Parent Folder',
                                       name => 'Subfolder',
                                       type => 'folder',
                                       size => 3, # items
                                       time => 1059807600, # 2-Aug-2003
                                      );


DESCRIPTION

This object represents a specific object in the briefcase (it can be a file or a folder) and holds various attributes for that object.


METHODS


new

  my $object =
    WWW::Yahoo::Briefcase::Object->new(
                                       location => $folder,
                                       name => $name,
                                       type => $extension,
                                       size => $size,
                                       time => $timestamp,
                                      );

If the object is a file, the extension, including the period, is used as the type and the extension is not part of the name. If the object is a folder, the type is 'folder' and the size is the number of objects immediately contained within the folder. The timestamp is the last-modified-date, expressed in unix time (seconds since epoch).


name

  my $name = $object->name;


type

  my $type = $object->type;


fullname

  my $fullname = $object->fullname;
  my $fullname = "$object";

Full name includes the extension (also known as the type, unless the object is a folder, in which case the type is 'folder').


size

  my $size = $object->size;


time

  my $time = $object->time;


SEE ALSO

WWW::Yahoo::Briefcase, Exception::Class


AUTHOR

Ken Neighbors, Ph.D. ken@nsds.com


COPYRIGHT AND LICENSE

Copyright 2003 by Ken Neighbors

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.000 or (at your option) any later version of Perl. That is, you can redistribute this module and/or modify it under the terms of either:

  a) the GNU General Public License as published by the Free Software
     Foundation; either version 1, or (at your option) any later version,
     or
  b) the "Artistic License" which comes with Perl, or
  c) the license terms of Perl versions later than 5.000
 WWW::Yahoo::Briefcase::Object - contains information about a file or folder