* @package Joomla.Framework * @subpackage FileSystem * @since 1.5 */ class extFolder { /** * Wrapper for the standard file_exists function * * @param string $path Folder name relative to installation dir * @return boolean True if path is a folder * @since 1.5 */ function exists( $path ) { return is_dir( extPath::clean( $path ) ) ; } /** * Makes path name safe to use * * @access public * @param string $path The full path to sanitise * @return string The sanitised string * @since 1.5 */ function makeSafe( $path ) { $ds = (DS == '\\') ? '\\' . DS : DS ; $regex = array( '#[^A-Za-z0-9:\_\-' . $ds . ' ]#' ) ; return preg_replace( $regex, '', $path ) ; } }