english/libraries/joomla/filesystem/stream.php
/**
	 * Determine the appropriate 'filename' of a file
	 *
	 * @param   string   $filename    Original filename of the file
	 * @param   string   $mode        Mode string to retrieve the filename
	 * @param   boolean  $use_prefix  Controls the use of a prefix
	 * @param   boolean  $relative    Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped.
	 *
	 * @return  string
	 *
	 * @since   11.1
	 */
Determine the appropriate 'filename' of a file
@param   string   $filename    Original filename of the file
@param   string   $mode        Mode string to retrieve the filename
@param   boolean  $use_prefix  Controls the use of a prefix
@param   boolean  $relative    Determines if the filename given is relative. Relative paths do not have JPATH_ROOT stripped.

@return  string


Determine the appropriate ' filename ' of a file @param string $filename Original filename of the file @param string $mode Mode string to retrieve the filename @param boolean $use_prefix Controls the use of a prefix @param boolean $relative Determines if the filename given is relative . Relative paths do not have JPATH_ROOT stripped . @return string
function _getFilename($filename, $mode, $use_prefix, $relative)
	{
		if ($use_prefix) {
			$tmode = trim($mode, 'btf123456789');
			if (in_array($tmode, JFilesystemHelper::getWriteModes())) {
				if (!$relative && $this->writeprefix) {
					$filename = str_replace(JPATH_ROOT, '', $filename);
				}
				$filename = $this->writeprefix . $filename;
			}
			else {
				if (!$relative && $this->readprefix) {
					$filename = str_replace(JPATH_ROOT, '', $filename);
				}
				$filename = $this->readprefix . $filename;
			}
		}
		return $filename;
	}
function _getFilename ( $ filename , $ mode , $ use_prefix , $ relative ) { if ( $ use_prefix ) { $ tmode = trim ( $ mode , 'btf123456789' ) ; if ( in_array ( $ tmode , JFilesystemHelper :: getWriteModes ( ) ) ) { if ( ! $ relative && $ this -> writeprefix ) { $ filename = str_replace ( JPATH_ROOT , '' , $ filename ) ; } $ filename = $ this -> writeprefix . $ filename ; } else { if ( ! $ relative && $ this -> readprefix ) { $ filename = str_replace ( JPATH_ROOT , '' , $ filename ) ; } $ filename = $ this -> readprefix . $ filename ; } } return $ filename ; }
Determine the appropriate 'filename' of a file
 @param   string   $filename    Original filename of the file
 @param   string   $mode        Mode string to retrieve the filename
 @param   boolean  $use_prefix  Controls the use of a prefix
 @param   boolean  $relative    Determines if the filename given is relative.
Determine the appropriate ' filename ' of a file @param string $filename Original filename of the file @param string $mode Mode string to retrieve the filename @param boolean $use_prefix Controls the use of a prefix @param boolean $relative Determines if the filename given is relative .
// Get rid of binary or t, should be at the end of the string // Check if it's a write mode then add the appropriate prefix // Get rid of JPATH_ROOT (legacy compat) along the way