A small : rather than coding complex string parsing routines when working with filepaths. Use existing built-in methods such as :
- python : `os.path.dirname(myPath) / os.path.basename(myPath)`

- java : `Paths.get(myPath).getParent() / getFileName()`

- macro : ` File.getDirectory(myPath) / File.getName(myPath)`

I have seen it in a number of different users that I think it's worth mentioning ;)

@LauLauThom For those on .NET, it's:
System.IO.Path.GetFileName/GetDirectoryName

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.