Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4072792
README.md
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
805 B
Referenced Files
None
Subscribers
None
README.md
View Options
RelPath
=======
RelPath
is
a
small
PHP
library
for
working
with
file
paths
,
to
join
two
paths
,
or
find
the
relative
path
to
a
path
from
the
current
directory
or
from
an
optional
start
directory
.
Here
is
how
you
use
it
:
```
php
$
relPath
=
\
Wikimedia
\
RelPath
::
getRelativePath
(
'
/
srv
/
mediawiki
/
resources
/
src
/
startup
.
js
'
,
'
/
srv
/
mediawiki
'
);
// Result: "resources/src/startup.js"
$
fullPath
=
\
Wikimedia
\
RelPath
::
joinPath
(
'
/
srv
/
mediawiki
'
,
'
resources
/
src
/
startup
.
js
'
);
// Result: "/srv/mediawiki/resources/src/startup.js"
$
fullPath
=
\
Wikimedia
\
RelPath
::
joinPath
(
'
/
srv
/
mediawiki
'
,
'
/
var
/
startup
/
startup
.
js
'
);
// Result: "/var/startup/startup.js"
```
The
`
RelPath
::
joinPath
()
`
function
provided
here
is
analogous
to
`
os
.
path
.
join
()
`
in
Python
,
and
`
path
.
join
()
`
found
in
Node
.
js
.
License
-------
MIT
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 17 2026, 08:47 (11 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
22/56/d47b760f4cc02bac1a0688a515e3
Default Alt Text
README.md (805 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment