filePathFileComponent :: FilePath -> Maybe String
filePathFileComponent path =
    let totalLength = length path
        slashPoint = maybe 0 (\index -> totalLength - index)
                           $ elemIndex '/' $ reverse path
    in if slashPoint == totalLength
      then Nothing
      else Just $ drop slashPoint path
filePathFileComponent :: FilePath -> Maybe String
filePathFileComponent path =
    let totalLength = length path
        slashPoint = maybe 0 (\index -> totalLength - index)
                           $ elemIndex '/' $ reverse path
    in if slashPoint == totalLength
      then Nothing
      else Just $ drop slashPoint path
filePathFileComponent path =
    let totalLength = length path
        slashPoint = maybe 0 (\index -> totalLength - index)
                           $ elemIndex '/' $ reverse path
    in if slashPoint == totalLength
      then Nothing
      else Just $ drop slashPoint path