`OC.basename()` should be enough to do what your `pop()` operation was doing.

For example: `OC.basename("/abc/def/ghi")` gives `ghi`, same result as if you do `"/abc/def/ghi".split('/').pop()`