briandfoy/test-file — Issue #1: Request for feature: dir_exists_ok
Author: barefootcoder
Created: 2011-12-30 03:02:31+00:00
State: open

Would you be willing to accept a patch to add a function such as:

dir_exists_ok( FILENAME [, NAME ] )

Ok if the file exists and is a directory, not ok if the file doesn't exist or exists but isn't a directory.

Could also call it `file_is_dir_ok` if that's preferable.

I would also be interested in possibly adding something like:

dir_exists_ok( DIRECTORY, FILENAME [, NAME ] )

Ok if the directory exists and contains a file named FILENAME, not ok otherwise.

but the first one is the main one I need. If you think this is a valuable addition, I'll code it up and issue a pull request.