The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::File -- test file attributes

SYNOPSIS

use Test::File;

DESCRIPTION

This modules provides a collection of test utilities for file attributes.

Some file attributes depend on the owner of the process testing the file in the same way the file test operators do.

FUNCTIONS

file_exists_ok( FILENAME [, NAME ] )

Ok if the file exists, and not ok otherwise.

file_not_exists_ok( FILENAME [, NAME ] )

Ok if the file does not exist, and not okay if it does exist.

file_empty_ok( FILENAME [, NAME ] )

Ok if the file exists and has empty size, not ok if the file does not exist or exists with non-zero size.

file_not_empty_ok( FILENAME [, NAME ] )

Ok if the file exists and has non-zero size, not ok if the file does not exist or exists with zero size.

file_size_ok( FILENAME, SIZE [, NAME ] )

Ok if the file exists and has SIZE size (exactly), not ok if the file does not exist or exists with size other than SIZE.

file_max_size_ok( FILENAME, MAX [, NAME ] )

Ok if the file exists and has size less than or equal to MAX, not ok if the file does not exist or exists with size greater than MAX.

file_min_size_ok( FILENAME, MIN [, NAME ] )

Ok if the file exists and has size greater than or equal to MIN, not ok if the file does not exist or exists with size less than MIN.

file_readable_ok( FILENAME [, NAME ] )

Ok if the file exists and is readable, not ok if the file does not exist or is not readable.

file_not_readable_ok( FILENAME [, NAME ] )

Ok if the file exists and is not readable, not ok if the file does not exist or is readable.

file_writeable_ok( FILENAME [, NAME ] )

Ok if the file exists and is writeable, not ok if the file does not exist or is not writeable.

file_not_writeable_ok( FILENAME [, NAME ] )

Ok if the file exists and is not writeable, not ok if the file does not exist or is writeable.

file_executable_ok( FILENAME [, NAME ] )

Ok if the file exists and is executable, not ok if the file does not exist or is not executable.

file_not_executable_ok( FILENAME [, NAME ] )

Ok if the file exists and is not executable, not ok if the file does not exist or is executable.

TO DO

* check properties for other users (readable_by_root, for instance)

* check owner, group

* check times

* check mode

* check number of links to file

* check path parts (directory, filename, extension)

SEE ALSO

Test::Builder, Test::More

SOURCE AVAILABILITY

This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.

        http://sourceforge.net/projects/brian-d-foy/

If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.

AUTHOR

brian d foy, <bdfoy@cpan.org>

COPYRIGHT

Copyright 2002-2004, brian d foy, All Rights Reserved

You may use, modify, and distribute this under the same terms as Perl itself.