====== clean ====== {#JAPI Joomla.Framework FileSystem JPath::clean #} This method strips additional / or \ in a path name. It can also add a trailing slash if desired. It will also change the slashes to the system appropriate folder separator (eg. \ on Microsoft Windows systems, but / on Unix systems). ===== Syntax ===== string clean ( **$p_path**, **$p_addtrailingslash** ) | **$p_path** | string | is a string containing the path to clean. | | **$p_addtrailingslash** | boolean | is a flag which specifies whether the method should add a trailing slash. This parameter is optional and if omitted defaults to true. | ===== Examples ===== jimport( 'joomla.filesystem.path' ); echo "Cleaned path: " . JPath::clean( '//..//..//..\\test.html' ); might produce: Cleaned path: \..\..\..\test.html\ ---- ~~DISCUSSION~~