Follow

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
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.