View Source

/hsphere/local/home/c251266/sunsetvines.com/www.sunsetvines.com/sunsetvines/current/vendor/creovel/classes/file.php (811 B)

#0001  
#0002  
#0003  
#0004  
#0005  
#0006  
#0007  
#0008  
#0009  
#0010  
#0011  
#0012  
#0013  
#0014  
#0015  
#0016  
#0017  
#0018  
#0019  
#0020  
#0021  
#0022  
#0023  
#0024  
#0025  
#0026  
#0027  
#0028  
#0029  
#0030  
#0031  
#0032  
#0033  
#0034  
#0035  
#0036  
#0037  
#0038  
#0039  
#0040  
#0041  
#0042  
#0043  
#0044  
#0045  
#0046  
#0047  
#0048  
#0049  
#0050  
#0051  
#0052  
#0053  
#0054  
<?php
/*
 * File managing class.
 */

class file
{

    private 
$filename;
    private 
$save_dir;
    private 
$temp_dir;

    private 
$max_size;
    
    public function 
extension($path)
    {
        return 
pathinfo($pathPATHINFO_EXTENSION);
    }
    
    public function 
type($file)
    {
        return 
get_mime_type($file);
    }
    
    public function 
size($file_path)
    {
        return 
get_filesize($file_path);
    }

    public function 
info($filename)
    {
        
$return pathinfo($filename);
        
$return['type'] = self::type($filename);
        
$return['size'] = self::size($filename);
        return 
$return;
    }

    public function 
copy($filename$destination)
    {
        return @
copy($filename$destination);
    }

    public function 
move($filename$destination)
    {
        return @
rename($filename$destination);
    }

    public function 
delete($filename)
    {
        return @
unlink($filename);
    }

}
?>