NAME
Net::Amazon::HadoopEC2::S3fs::Inode - A representation of Hadoop-ec2 s3fs inode.
SYNOPSIS
use Net::Amazon::HadoopEC2::S3fs;
my $fs = Net::Amazon::HadoopEC2::S3fs->new(
{
aws_access_key_id => $EVN{AWS_ACCESS_KEY_ID},
aws_secret_access_key => $ENV{AWS_SECRET_ACCESS_KEY},
bucket => 'your_bucket',
}
);
my $file = $fs->put(
{
file => 'filename',
destination => '/user/root',
}
);
my $files_listed = $fs->ls(
{
path => '/user/root',
}
);
for my $file (@{$files_listed}) {
$file->remove;
}
DESCRIPTION
Net::Amazon::HadoopEC2::S3fs::Inode is a representation of Hadoop-ec2 s3fs inode.
METHODS
put([$file])
Puts the inode to the s3fs. If the inode is file, $file argument is required. Otherwise ( if the inode is directory, ) $file argument should not be passed.
get(\%args)
Gets the file to the specified destination. Returns the file path saved on success, undef on failure. The Arguments are:
remove
Removes the s3fs file/direcotry. Returns 1 on success, undef on failure.
AUTHOR
Nobuo Danjou <nobuo.danjou@gmail.com>