NAME
Test::File::Cleaner::State - State information for Test::File::Cleaner
DESCRIPTION
A Test::File::Cleaner::State object stores the state information for a single file or directory, and performs tasks to restore old states.
METHODS
new $file
Creates a new State object for a given file name. The file or directory must exist.
Returns a new Test::File::Cleaner::State object, or dies on error.
path
Returns the path of the file
dir
Returns true if the state object is a directory
Stat
Returns the File::stat object for the file
mode
Returns the permissions mode for the file/directory
clean
Cleans the state object, by examining the new state of the file, and reverting it to the old one if possible.
remove
The remove
method deletes a file for which we are holding a state. The reason we provide a special method for this is that in some situations, a file permissions may not allow us to remove it, and thus we may need to correct it's permissions first.
SUPPORT
Bugs should be submitted via the CPAN bug tracker, located at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-File-Cleaner
For other issues, or commercial enhancement or support, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
ACKNOWLEDGEMENTS
Thank you to Phase N Australia ( http://phase-n.com/ ) for permitting the open sourcing and release of this distribution as a spin-off from a commercial project.
COPYRIGHT
Copyright 2004 - 2007 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.