}
}
- /**
- * Removes a leading slash from the given path.
- *
- * @param string $path
- * @return string
- */
- public static function removeLeadingSlash($path) {
- return ltrim($path, '/');
- }
-
- /**
- * Removes a trailing slash from the given path.
- *
- * @param string $path
- * @return string
- */
- public static function removeTrailingSlash($path) {
- return rtrim($path, '/');
- }
-
/**
* Adds a trailing slash to the given path.
*
return rtrim($path, '/').'/';
}
- /**
- * Adds a leading slash to the given path.
- *
- * @param string $path
- * @return string
- */
- public static function addLeadingSlash($path) {
- return '/'.ltrim($path, '/');
- }
-
/**
* Creates a path on the local filesystem and returns true on success.
* Parent directories do not need to exists as they will be created if