MongoDB::GridFS::File - A Mongo GridFS file
version 0.502.1
use MongoDB::GridFS::File; my $outfile = IO::File->new("outfile", "w"); my $file = $grid->find_one; $file->print($outfile);
A hash of info information saved with this file.
$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.
$length
$offset
$fh
$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.
Kristina Chodorow <kristina@mongodb.org>
Florian Ragwitz <rafl@debian.org>
Mike Friedman <mike.friedman@10gen.com>
This software is Copyright (c) 2012 by 10gen, Inc..
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MongoDB
CPAN shell
perl -MCPAN -e shell install MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.