NAME
Mojo::File::Memory - In-Memory File
SYNOPSIS
use Mojo::File::Memory;
my $file = Mojo::File::Memory->new('Hello!');
$file->add_chunk('World!');
print $file->slurp;
DESCRIPTION
Mojo::File::Memory is a container for in-memory files.
ATTRIBUTES
file_length
my $file_length = $file->file_length;
content
my $handle = $file->content;
$file = $file->content('Hello World!');
METHODS
Mojo::File::Memory inherits all methods from Mojo::File and implements the following new ones.
new
my $file = Mojo::File::Memory->new('foo bar');
add_chunk
$file = $file->add_chunk('test 123');
contains
my $contains = $file->contains('random string');
get_chunk
my $chunk = $file->get_chunk($offset);
slurp
my $string = $file->slurp;