Contao\Validator::isValidFileName PHP Method

isValidFileName() public static method

Valid file name
public static isValidFileName ( mixed $strName ) : boolean
$strName mixed The file name
return boolean True if the file name is valid
    public static function isValidFileName($strName)
    {
        if ($strName == '') {
            return false;
        }
        // Special characters not supported on e.g. Windows
        if (preg_match('@[\\\\/:*?"<>|]@', $strName)) {
            return false;
        }
        // Invisible control characters or unused code points
        if (preg_match('/[\\pC]/u', $strName) !== 0) {
            return false;
        }
        // Must not be longer than 255 characters
        if (mb_strlen($strName) > 255) {
            return false;
        }
        return true;
    }