The path in a URL is defined as the following (https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) :
A path, which contains data, usually organized in hierarchical form,
that appears as a sequence of segments separated by slashes. Such a
sequence may resemble or map exactly to a file system path, but does not
always imply a relation to one.[9] The path must begin with a single slash
(/) if an authority part was present, and may also if one was not, but must
not begin with a double slash.
You can rely on the path to be made up of parts that will not begin with a double slash, and will be separated by slashes, and be defined by a specific character set. URLs also contain a query and a fragment after the path, and the client can choose whether to keep those in the file name or not.Wget has many options which define how file names are created, mainly to better serve in mirroring large complex websites. But in general, whatever the "path" was, the final part of the path will be the file name, or a default one is provided. There are options for enforcing suffixes, creating directory structures recursively, changing accepted character sets for file names, and hundreds more options.