2017 © Pedro Peláez
 

library relpath

Compute a relative filepath between two paths.

image

wikimedia/relpath

Compute a relative filepath between two paths.

  • Saturday, July 28, 2018
  • by mediawiki
  • Repository
  • 16 Watchers
  • 5 Stars
  • 166,275 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 8 % Grown

The README.md

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., (*1)

Here is how you use it:, (*2)

$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., (*3)

License

MIT, (*4)

The Versions

18/01 2018

2.1.1

2.1.1.0 https://www.mediawiki.org/wiki/RelPath

Compute a relative filepath between two paths.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Ori Livneh

30/12 2017

2.1.0

2.1.0.0 https://www.mediawiki.org/wiki/RelPath

Compute a relative filepath between two paths.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Ori Livneh

28/07 2017

2.0.0

2.0.0.0 https://www.mediawiki.org/wiki/RelPath

Compute a relative filepath between two paths.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Ori Livneh

28/07 2017

1.0.4

1.0.4.0 https://www.mediawiki.org/wiki/RelPath

Compute a relative filepath between two paths.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Ori Livneh

29/09 2015

1.0.3

1.0.3.0 https://www.mediawiki.org/wiki/RelPath

Compute a relative filepath between two paths.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Ori Livneh

29/09 2015

1.0.2

1.0.2.0 https://www.mediawiki.org/wiki/RelPath

Compute a relative filepath to some path either from the current directory or from an optional start directory.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Ori Livneh

29/09 2015

1.0.1

1.0.1.0 https://www.mediawiki.org/wiki/RelPath

Compute a relative filepath to some path either from the current directory or from an optional start directory.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Ori Livneh

29/09 2015

1.0.0

1.0.0.0 https://www.mediawiki.org/wiki/RelPath

Compute a relative filepath to some path either from the current directory or from an optional start directory.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Ori Livneh