[Issue 20865] New: Add std.path : isSubPath

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 26 11:13:23 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20865

          Issue ID: 20865
           Summary: Add std.path : isSubPath
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: andre at s-e-a-p.de

Could you add a function isSubPath to std.path?

assert("/opt".isSubPath("/opt/sub"));
assert("/opt".isSubPath("/lib") == false);

To be considered:
- What is the result of isSubPath("/opt", "/opt")
- Path and subPath needs to be resolved to absolute paths and on
  *ix system ~ needs to be resolved

--


More information about the Digitalmars-d-bugs mailing list