Finnigan

 view release on metacpan or  search on metacpan

lib/Finnigan/OLE2DirectoryEntry.pm  view on Meta::CPAN

      # $desc .= sprintf " of %s bytes", $self->file->sector_size($stream_size);
      # print "$desc\n";

      last unless $block;

      $first = $block;
      $previous = $block;
      $size = $self->file->sector_size;
    }
    return substr($data, 0, $self->size);
  }
  return undef;
}

sub file {
  shift->{file};
}

sub name {
  shift->{name};
}

sub type {
  shift->{type};
}

sub size {
  shift->{size};
}

sub start {
  shift->{start};
}

1;
__END__

=head1 NAME

Finnigan::OLE2DirectoryEntry -- a decoder for the Microsoft OLE2 directory entry

=head1 SYNOPSIS

  use Finnigan;
  my $dir = new Finnigan::OLE2DirectoryEntry($ole2file, 0);
  $dir->list();

=head1 DESCRIPTION

The OLE2 directory entries are organized in a red-black tree (for
efficiency of access). The directory entry's constructor method
B<new()> is called recursively starting from the root directory
contained in the file's 0-th property.

=head2 METHODS

=over 4

=item new($file, $propertyIndex)

The constructor method. Its first argument is a reference to Finnigan::OLE2File, and the second argument is the index of the file's property (Finnigan::OLE2Property) to be decoded as a directory entry. The root directory is always found in property n...

=item list($style)

Lists the directory's contents to STDOUT. The style argument can have
three values: wiki, html, and plain (or undefined). The wiki and html
styles have not been implemented yet.

This method is not useful as part of the API (directory listings are
better understood by humans). But once the path to a node is known, it
can be retrieved with the find method.

=item find($path)

Get the directory entry (Finnigan::OLE2DirectoryEntry) matching the
path supplied in the only argument. The directory entry's data method
needs to be called in order to extract the node data.=back

=back

=head2 PRIVATE METHODS

=over 4

=item data

=item file

=item name

=item render_list_item

=item size

=item start

=item type

=back

=head1 SEE ALSO

Finnigan::OLE2File

Finnigan::OLE2Property

L<Windows Compound Binary File Format Specification|http://download.microsoft.com/download/0/B/E/0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886/WindowsCompoundBinaryFileFormatSpecification.pdf>

=head1 AUTHOR

Gene Selkov, E<lt>selkovjr@gmail.comE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2010 by Gene Selkov

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.




( run in 1.073 second using v1.01-cache-2.11-cpan-f56aa216473 )