NAME

IO::Easy - is easy to use class for operations with filesystem objects.

ABSTRACT

We wanted to provide Perl with the interface for file system objects with the simplicity similar to shell. The following operations can be used as an example: operations for recursive creation (mkdir -p) and removing (rm -rf), touching file.

IO::Easy transparently processes file system paths independently from operating system with help of File::Spec module and does not require a lot of additional modules from CPAN.

For better understanding of IO::Easy processing principles you should keep in mind that it operates with "Path Context". "Path Context" means that for any path in any file system IO::Easy takes path parts which are between path separators, but doesn't include path separators themselves, and tries to fetch the path in the current system from these path parts. This way it can substitute different path separators from system to system (as long as they may differ depending on operating system, this also includes drive specification e.g. for Windows) and doesn't depend on some system specifics of paths representation.

SYNOPSIS

use IO::Easy;

my $io = IO::Easy->new ('.');

# file object "./example.txt" for unix
my $file = $io->append ('example.txt')->as_file;

my $content = "Some text goes here!";

$file->store ($content); 

METHODS

new

Creates new IO::Easy object, takes path as parameter. IO::Easy object for abstract file system path. For operating with typed objects there were 2 additional modules created: IO::Easy::File IO::Easy::Dir

You can use method attach_interface for automatic object conversion for existing filesystem object or force type by using methods as_file or as_dir.

name

return current filesystem object name

as_file, as_dir, attach_interface

TODO

AUTHOR

Ivan Baktsheev, <apla at the-singlers.us>

BUGS

Please report any bugs or feature requests to my email address, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IO-Easy. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2007-2009 Ivan Baktsheev

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.