src/bbn/file.php
public function get_extension()
  {
    if ( $this->name ){
      if ( !isset($this->ext) ){
        if ( strpos($this->name, '.') !== false ){
          $p = str::file_ext($this->name, 1);
          $this->ext = $p[1];
          $this->title = $p[0];
        }
        else{
          $this->ext = '';
          $this->title = substr($this->name,-1) === '/' ? substr($this->name,0,-1) : $this->name;
        }
      }
      return $this->ext;
    }
    return false;
  }
public function get_extension()
  {
    if ( $this->name ){
      if ( !isset($this->ext) ){
        if ( strpos($this->name, '.') !== false ){
          $p = str::file_ext($this->name, 1);
          $this->ext = $p[1];
          $this->title = $p[0];
        }
        else{
          $this->ext = '';
          $this->title = substr($this->name,-1) === '/' ? substr($this->name,0,-1) : $this->name;
        }
      }
      return $this->ext;
    }
    return false;
  }
public function get_extension ( ) { if ( $ this -> name ) { if ( ! isset ( $ this -> ext ) ) { if ( strpos ( $ this -> name , '.' ) !== false ) { $ p = str :: file_ext ( $ this -> name , 1 ) ; $ this -> ext = $ p [ 1 ] ; $ this -> title = $ p [ 0 ] ; } else { $ this -> ext = '' ; $ this -> title = substr ( $ this -> name , - 1 ) === '/' ? substr ( $ this -> name , 0 , - 1 ) : $ this -> name ; } } return $ this -> ext ; } return false ; }
Return the extension of the file.

```php
$file = new file('C:/Test/file.txt');
bbn\x::dump($file->get_extension());
//(string) 'txt'
```

@return string|false
Return the extension of the file .