public function _getFilename($filename, $mode, $use_prefix, $relative) { if ($use_prefix) { // Get rid of binary or t, should be at the end of the string $tmode = trim($mode, 'btf123456789'); // Check if it's a write mode then add the appropriate prefix // Get rid of MPATH_ROOT (legacy compat) along the way if (in_array($tmode, MFilesystemHelper::getWriteModes())) { if (!$relative && $this->writeprefix) { $filename = str_replace(MPATH_ROOT, '', $filename); } $filename = $this->writeprefix . $filename; } else { if (!$relative && $this->readprefix) { $filename = str_replace(MPATH_ROOT, '', $filename); } $filename = $this->readprefix . $filename; } } return $filename; }
public static function isMiwiStream($streamname) { return in_array($streamname, MFilesystemHelper::getMStreams()); }