Mike Friedman > MongoDB-0.46.3 > MongoDB::GridFS::File

Download:
MongoDB-0.46.3.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.46.3   Source   Latest Release: MongoDB-v0.999.998.1-TRIAL

NAME ^

MongoDB::GridFS::File - A Mongo GridFS file

SYNOPSIS ^

    use MongoDB::GridFS::File;

    my $outfile = IO::File->new("outfile", "w");
    my $file = $grid->find_one;
    $file->print($outfile);

ATTRIBUTES ^

info

A hash of info information saved with this file.

METHODS ^

print ($fh, $length?, $offset?)

    $written = $file->print($fh, 50, 200);

Writes the number of bytes specified from the offset specified to the given file handle. If no $length or $offset are given, the entire file is written to $fh. Returns the number of bytes written.

slurp ($length?, $offset?)

    $bytes = $file->slurp(50, 200);
    $all   = $file->slurp

Return the number of bytes specified from the offset specified to the given file handle. If no $length or $offset are given, the entire file is return.

AUTHOR ^

  Kristina Chodorow <kristina@mongodb.org>
syntax highlighting: