Closed notimaginative closed 10 months ago
I think this is correct based on the documentation, but you may want to check me on it. Tested on mac, Linux, and Windows and it appeared to work properly on all three. My Windows setup is pretty basic however so I can't say for sure it's 100% there.
Looks good to me.
FileInfo(x).Directory returns the parent directory of x. If x is already a directory then it moves up a level, possibly changing mount points on *nix systems and giving incorrect values. So use full path of x if it's a directory and parent of x otherwise.