src/bbn/file.php
public function save($dest='./')
  {
    $new_name = false;
    if ( substr($dest,-1) === '/' ){
      if ( is_dir($dest) ){
        $new_name = 0;
      }
    }
    else if ( is_dir($dest) ){
      $dest .= '/';
      $new_name = 0;
    }
    else if ( is_dir(substr($dest,0,strrpos($dest,'/'))) ){
      $new_name = 1;
    }
    if ( $new_name !== false ){
      if ( $new_name === 0 ){
        $dest .= $this->name;
      }
      if ( null !== $_FILES ){
        move_uploaded_file($this->file,$dest);
        $this->file = $dest;
        $this->uploaded = 1;
      }
      else{
        copy($this->file, $dest);
      }
    }
    return $this;
  }
public function save($dest='./')
  {
    $new_name = false;
    if ( substr($dest,-1) === '/' ){
      if ( is_dir($dest) ){
        $new_name = 0;
      }
    }
    else if ( is_dir($dest) ){
      $dest .= '/';
      $new_name = 0;
    }
    else if ( is_dir(substr($dest,0,strrpos($dest,'/'))) ){
      $new_name = 1;
    }
    if ( $new_name !== false ){
      if ( $new_name === 0 ){
        $dest .= $this->name;
      }
      if ( null !== $_FILES ){
        move_uploaded_file($this->file,$dest);
        $this->file = $dest;
        $this->uploaded = 1;
      }
      else{
        copy($this->file, $dest);
      }
    }
    return $this;
  }
public function save ( $ dest = './' ) { $ new_name = false ; if ( substr ( $ dest , - 1 ) === '/' ) { if ( is_dir ( $ dest ) ) { $ new_name = 0 ; } } else if ( is_dir ( $ dest ) ) { $ dest .= '/' ; $ new_name = 0 ; } else if ( is_dir ( substr ( $ dest , 0 , strrpos ( $ dest , '/' ) ) ) ) { $ new_name = 1 ; } if ( $ new_name !== false ) { if ( $ new_name === 0 ) { $ dest .= $ this -> name ; } if ( null !== $ _FILES ) { move_uploaded_file ( $ this -> file , $ dest ) ; $ this -> file = $ dest ; $ this -> uploaded = 1 ; } else { copy ( $ this -> file , $ dest ) ; } } return $ this ; }
That feature saves the file as a parameter, and accepts a string that contains the path where to save.

```php
$file->save('/home/user/desktop/');
```

@param string $dest
@return file
That feature saves the file as a parameter and accepts a string that contains the path where to save .