1RelPath 2======= 3 4RelPath is a small PHP library for computing a relative filepath to some path, 5either from the current directory or from an optional start directory. 6 7Here is how you use it: 8 9```php 10$relPath = \Wikimedia\RelPath::getRelativePath( '/srv/mediawiki/resources/src/startup.js', '/srv/mediawiki' ); 11// Result: "resources/src/startup.js" 12 13$fullPath = \Wikimedia\RelPath::joinPath( '/srv/mediawiki', 'resources/src/startup.js' ); 14// Result: "/srv/mediawiki/resources/src/startup.js" 15 16$fullPath = \Wikimedia\RelPath::joinPath( '/srv/mediawiki', '/var/startup/startup.js' ); 17// Result: "/var/startup/startup.js" 18``` 19 20The `RelPath::joinPath()` function provided here is analogous to `os.path.join()` in Python, 21and `path.join()` found in Node.js. 22 23License 24------- 25 26MIT 27