This reverts commit 84c8905d52
.
Fixed the cygwin failure...
pull/12138/head
parent
22f90fd469
commit
946a3561c2
6 changed files with 112 additions and 8 deletions
@ -0,0 +1,17 @@ |
||||
## `fs.relative_to()` |
||||
|
||||
The `fs` module now has a `relative_to` method. The method will return the |
||||
relative path from argument one to argument two, if one exists. Otherwise, the |
||||
absolute path to argument one is returned. |
||||
|
||||
```meson |
||||
assert(fs.relative_to('c:\\prefix\\lib', 'c:\\prefix\\bin') == '..\\lib') |
||||
assert(fs.relative_to('c:\\proj1\\foo', 'd:\\proj1\\bar') == 'c:\\proj1\\foo') |
||||
assert(fs.relative_to('prefix\\lib\\foo', 'prefix') == 'lib\\foo') |
||||
|
||||
assert(fs.relative_to('/prefix/lib', '/prefix/bin') == '../lib') |
||||
assert(fs.relative_to('prefix/lib/foo', 'prefix') == 'lib/foo') |
||||
``` |
||||
|
||||
In addition to strings, it can handle files, custom targets, custom target |
||||
indices, and build targets. |
@ -0,0 +1,5 @@ |
||||
int |
||||
main(void) |
||||
{ |
||||
return 0; |
||||
} |
Loading…
Reference in new issue