- COPYRIGHT & LICENSE
CatalystX::CRUD::Object::File - filesystem CRUD instance
package My::File; use base qw( CatalystX::CRUD::Object::File ); 1;
CatalystX::CRUD::Object::File delegates to Path::Class:File.
Only new or overridden methods are documented here.
new( file => path/to/file )
Returns new CXCO::File object.
The contents of the delegate() file object. Set when you call read(). Set it yourself and call create() or update() as appropriate to write to the file.
Writes content() to a file. If the file already exists, will throw_error(), so call it like:
-s $file ? $file->update : $file->create;
Returns the number of bytes written.
Slurp contents of file into content(). No check is performed as to whether the file exists, so call like:
$file->read if -s $file;
Just like create() only no check is made if the file exists prior to writing to it. Returns the number of bytes written.
Remove the file from the filesystem.
Returns true if the file does not yet exist.
Returns the File object as a hashref with 2 keys: file and content.
<perl at peknet.com>
Please report any bugs or feature requests to
bug-catalystx-crud at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CatalystX-CRUD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
RT: CPAN's request tracker
COPYRIGHT & LICENSE
Copyright 2007 Peter Karman, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.