WordPress at a glance
function is not described

wpsc_get_realpath() WPSCache 1.0

realpath() doesn't always remove the trailing slash

No Hooks.

Return

Null. Nothing.

Usage

wpsc_get_realpath( $directory );

Code of wpsc_get_realpath() WPSCache 1.7.1

<?php
function wpsc_get_realpath( $directory ) {
	if ( $directory == '/' ) {
		return false;
	}

	$original_dir = $directory;
	$directory = realpath( $directory );

	if ( ! $directory ) {
		wp_cache_debug( "wpsc_get_realpath: directory does not exist - $original_dir" );
		return false;
	}

	if ( substr( $directory, -1 ) == '/' || substr( $directory, -1 ) == '\\' ) {
		$directory = substr( $directory, 0, -1 ); // remove trailing slash
	}

	return $directory;
}