This Vim plugin provides text objects for file paths.
ap selects the next path not including the basename and ip selects the next path including the basename.
aP selects the previous path not including the basename and iP selects the previous path including the basename.
This plugin depends on the textobj-user plugin.