Show
Ignore:
Timestamp:
07/20/2008 08:34:36 PM (4 months ago)
Author:
Shadowhand
Message:

Replacing file_exists calls with is_file and is_dir, where possible.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/core/Kohana.php

    r3164 r3168  
    563563                $filename = self::log_directory().date('Y-m-d').'.log'.EXT; 
    564564 
    565                 if ( ! file_exists($filename)) 
     565                if ( ! is_file($filename)) 
    566566                { 
    567567                        // Write the SYSPATH checking header 
     
    605605                        $dir = realpath($dir); 
    606606 
    607                         if (file_exists($dir) AND is_dir($dir) AND is_writable($dir)) 
     607                        if (is_dir($dir) AND is_writable($dir)) 
    608608                        { 
    609609                                // Change the log directory 
     
    634634                        $path = APPPATH.'cache/kohana_'.$name; 
    635635 
    636                         if (file_exists($path)) 
     636                        if (is_file($path)) 
    637637                        { 
    638638                                // Check the file modification time 
     
    671671                        { 
    672672                                // Delete cache 
    673                                 return (file_exists($path) and unlink($path)); 
     673                                return (is_file($path) and unlink($path)); 
    674674                        } 
    675675                        else