static function getName($path)
    {
        Checker::argStringNonEmpty("path", $path);

        if ($path[0] !== "/") {
            throw new \InvalidArgumentException("'path' must start with \"/\"");
        }
        $l = strlen($path);
        if ($l === 1) return null;
        if ($path[$l-1] === "/") {
            throw new \InvalidArgumentException("'path' must not end with \"/\"");
        }

        $lastSlash = strrpos($path, "/");
        return substr($path, $lastSlash+1);
    }
static function getName($path)
    {
        Checker::argStringNonEmpty("path", $path);

        if ($path[0] !== "/") {
            throw new \InvalidArgumentException("'path' must start with \"/\"");
        }
        $l = strlen($path);
        if ($l === 1) return null;
        if ($path[$l-1] === "/") {
            throw new \InvalidArgumentException("'path' must not end with \"/\"");
        }

        $lastSlash = strrpos($path, "/");
        return substr($path, $lastSlash+1);
    }
Return the last component of a path (the file or folder name).

<code>
Path::getName("/Misc/Notes.txt") // "Notes.txt"
Path::getName("/Misc")           // "Misc"
Path::getName("/")               // null
</code>

@param string $path
The full path you want to get the last component of.

@return null|string
The last component of `$path` or `null` if the given
`$path` was `"/"`.