If I have a file path such as...

/home/smith/Desktop/Test
/home/smith/Desktop/Test/

How do I change the string so it will be the parent directory?

e.g.

/home/smith/Desktop
/home/smith/Desktop/

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top