Mecha CMS

Path::F()

Convert file or folder path to a folder path.

2.0.0 Static

Path::F(string $value, string $join = DS);

Example:

$A = Path::D('a\b\c\foo\bar\baz.qux');
$B = Path::D('a\b\c\foo\bar\baz');
$C = Path::F('a\b\c\foo\bar\baz.qux');
$D = Path::F('a\b\c\foo\bar\baz');

$E = Path::F('a\b\c\foo\bar\baz.qux', '/');

Result:

$A = 'a\b\c\foo\bar';
$B = 'a\b\c\foo\bar';
$C = 'a\b\c\foo\bar\baz';
$D = 'a\b\c\foo\bar\baz';

$E = 'a/b/c/foo/bar/baz';