Mojo::Asset::File man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Mojo::Asset::File(3)  User Contributed Perl Documentation Mojo::Asset::File(3)

NAME
       Mojo::Asset::File - File Asset

SYNOPSIS
	 use Mojo::Asset::File;

	 my $asset = Mojo::Asset::File->new;
	 $asset->add_chunk('foo bar baz');
	 print $asset->slurp;

	 my $asset = Mojo::Asset::File->new(path => '/foo/bar/baz.txt');
	 print $asset->slurp;

DESCRIPTION
       Mojo::Asset::File is a container for file assets.

ATTRIBUTES
       Mojo::Asset::File implements the following attributes.

   "cleanup"
	 my $cleanup = $asset->cleanup;
	 $asset	     = $asset->cleanup(1);

       Delete file automatically once it's not used anymore.

   "handle"
	 my $handle = $asset->handle;
	 $asset	    = $asset->handle(IO::File->new);

       Actual file handle.

   "path"
	 my $path = $asset->path;
	 $asset	  = $asset->path('/foo/bar/baz.txt');

       Actual file path.

   "tmpdir"
	 my $tmpdir = $asset->tmpdir;
	 $asset	    = $asset->tmpdir('/tmp');

       Temporary directory.

METHODS
       Mojo::Asset::File inherits all methods from Mojo::Asset and implements
       the following new ones.

   "add_chunk"
	 $asset = $asset->add_chunk('foo bar baz');

       Add chunk of data to asset.

   "contains"
	 my $position = $asset->contains('bar');

       Check if asset contains a specific string.

   "get_chunk"
	 my $chunk = $asset->get_chunk($start);

       Get chunk of data starting from a specific position.

   "move_to"
	 $asset = $asset->move_to('/foo/bar/baz.txt');

       Move asset data into a specific file.

   "size"
	 my $size = $asset->size;

       Size of asset data in bytes.

   "slurp"
	 my $string = $file->slurp;

       Read all asset data at once.

SEE ALSO
       Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.

perl v5.14.1			  2011-09-11		  Mojo::Asset::File(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net