>_ IzzyLab

Topic breakdown

basename and dirname take a path apart: the first returns the last component (the name of a file or directory), the second — the parent path. They work purely on the path string and don't touch the disk, so they can be applied to paths that don't exist. basename can also strip a suffix: basename file.tar.gz .gz → file.tar.

What's checked

  1. file name is correct
  2. directory is correct

What it looks like