src/php/Webforge/Common/System/File.php
public function setName($name) {
    if (($pos = mb_strrpos($name,'.')) !== FALSE) {
      $this->name = mb_substr($name, 0, $pos);
      $this->extension = mb_substr($name, $pos+1);
    } else {
      $this->name = $name;
    }
    
    return $this;
  }
public function setName($name) {
    if (($pos = mb_strrpos($name,'.')) !== FALSE) {
      $this->name = mb_substr($name, 0, $pos);
      $this->extension = mb_substr($name, $pos+1);
    } else {
      $this->name = $name;
    }
    
    return $this;
  }
public function setName ( $ name ) { if ( ( $ pos = mb_strrpos ( $ name , '.' ) ) !== FALSE ) { $ this -> name = mb_substr ( $ name , 0 , $ pos ) ; $ this -> extension = mb_substr ( $ name , $ pos + 1 ) ; } else { $ this -> name = $ name ; } return $ this ; }
Sets the name of the file

If extension is NOT found in $name extension won't be replaced

@param string $name filename with extension
@chainable
Sets the name of the file