This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Helper_Validation_File

Helper elements for validating uploaded and existing files in Concrete.

Direct known subclasses


Package: Helpers\Validation
Copyright: Copyright (c) 2003-2008 Concrete5. (
License: MIT License
Author: Andrew Embler
Located at core/helpers/validation/file.php

Methods summary

public boolean
# image( $pathToImage )

Tests whether the passed item a valid image.

public boolean
# file( $pathToFile )

Tests whether a file exists

public boolean
# extension( string $filename, array $extensions = NULL )

Parses the file extension for a given file name, checks it to see if it's in the the extension array if provided if not, it checks to see if it's in the UPLOAD_FILE_EXTENSIONS_ALLOWED constant

# filetype( $filename, $extensions = null )