Assuming a file & a folder does exist, I want a function to check if the file is contained by the folder.
For example: /a/b
contains /a/b/c/d.e
, /a/b
contains /a/b/c.d
, /a/b
does not contain /a/b/../c/d.e
.
What I get now is to normalize the path, then compare the prefix part. Is there some clean and simple way to do this?