public function setSource($path)
{
if (!file_exists($path) || is_dir($path)) {
throw new CException("File doesn't exist: " . $path);
}
$this->_source_path = $path;
$this->name = basename($path);
// Set MIME type
$path_parts = pathinfo($this->name);
$this->mimetype = $this->lookupMimetype($path);
// Set size
$this->size = filesize($path);
// UID
$this->generateUID();
}