Absolute Path to parent directory.
import dshould; version(Posix) { Path("/tmp").parent.toString.should.equal("/"); Path("/").parent.toString.should.equal("/"); Path("/tmp/parent/child").parent.toString.should.equal("/tmp/parent"); Path("parent/child").parent.toString.should.equal( Path(std.file.getcwd).join("parent").toString); auto cdir = std.file.getcwd; scope(exit) std.file.chdir(cdir); std.file.chdir("/tmp"); Path("parent/child").parent.toString.should.equal("/tmp/parent"); Path("~/test-dir").parent.toString.should.equal( "~".expandTilde); }
determine parent path of this path