Function getFileName

Retrieves the file name from a given URL.

  • Parameters

    • url: string

      The URL from which to retrieve the file name.

    • OptionalwithExtension: boolean = true

      Indicates whether the file name should include the extension.

    Returns string

    • The file name extracted from the URL.