/**
 * Reads the last segment of the file path and returns it as a file name.
 *
 * @param path THe file path.
 */
export function getFileName(path: string): string {
  const delimiter = path.includes('/') ? '/' : '\\'
  const last = path.split(delimiter).pop()
  return last || ''
}
