public function getExtension(string $path) : string
    {
        if (!$this->exists($path)) {
            throw new FileSystemException("File at path $path not found");
        }

        return pathinfo($path, PATHINFO_EXTENSION);
    }
public function getExtension(string $path) : string
    {
        if (!$this->exists($path)) {
            throw new FileSystemException("File at path $path not found");
        }

        return pathinfo($path, PATHINFO_EXTENSION);
    }
public function getExtension ( string $ path ) : string { if ( ! $ this -> exists ( $ path ) ) { throw new FileSystemException ( "File at path $path not found" ) ; } return pathinfo ( $ path , PATHINFO_EXTENSION ) ; }
Gets the extension of a file

@param string $path The path to check
@return string The extension of the file
@throws FileSystemException Thrown if the file does not exist
Gets the extension of a file