NAME
MogileFS::Client - client library for the MogileFS distributed file system
SYNOPSIS
use MogileFS::Client;
# create client object w/ server-configured namespace and IPs of trackers
$mogc = MogileFS::Client->new(domain => "foo.com::my_namespace",
hosts => ['10.0.0.2', '10.0.0.3']);
# create a file
$key = "image_of_userid:$userid"; # mogile is a flat namespace. no paths.
$class = "user_images"; # must be configured on server
$fh = $mogc->new_file($key, $class);
print $fh $data;
unless ($fh->close) {
die "Error writing file: " . $mogc->errcode . ": " . $mogc->errstr;
}
# Find the URLs that the file was replicated to. May change over time.
@urls = $mogc->get_paths($key);
# no longer want it?
$mogc->delete($key);
# read source for more methods. those are the major ones.
DESCRIPTION
See http://www.danga.com/mogilefs/
COPYRIGHT
This module is Copyright 2003-2004 Brad Fitzpatrick, and copyright 2005-2006 Six Apart, Ltd.
All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
WARRANTY
This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
AUTHORS
Brad Fitzpatrick <brad@danga.com>
Brad Whitaker <whitaker@danga.com>
Mark Smith <marksmith@danga.com>