is_dir

  • PHP

    $is_dir = is_dir('/path/to/foobar');
    var_export($is_dir);
     
    //=> true

    Ruby

    is_dir = File.directory?('/path/to/foobar')
    var_export(is_dir)
     
    #=> true

    see also

is_bool is_double

Looking for Rails or PHP web application development, integration, and training?

Rails for PHP is brought to you by Maintainable Software. Get custom web applications and personalized training from the authors of the book and website.