is_file

  • PHP

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

    Ruby

    is_file = File.file?('/path/to/foobar')
    p is_file
     
    #=> true

    see also

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.