Relatively often I have to perform the following operation: Given filename F, add path P, but only if F doesn't already contain a path. So:
F: file.txt
P: c:\foo
Result: c:\foo\file.txt
F: c:\bloo\file.txt
P: c:\foo
Result: c:\bloo\file.txt
It's relatively awkward to do this succinctly: I use an if/else with a regular expression. A single operation to do it (perhaps by extending path manipulation even further) would be handy. Perhaps with a flag allowing the provided path to always override any given path.
Steve