有没有现成的函数可以返回一个目录的父目录?

比如给定目录 “/home/foo/bar/”, 输出其父目录 “/home/foo/”. 需要处理windows和linux不同的分隔符.

directory-file-name 加 file-name-directory 吧