Get legacy file string name

@return string
339060
public function getName($os = null)
    {
        if ($os === null) {
            if (strstr(strtoupper(php_uname()), "WIN")) $os = self::OS_WINDOWS;
            elseif (strstr(strtoupper(php_uname()), "MACOS")) $os = self::OS_MAC;
            else $os = self::OS_UNIX;
        }
        $host = $this->getHost();

        $filename = $this->getPath();
        if ($filename{0} === '/' && $os == self::OS_WINDOWS) {
            $filename = substr($filename, 1);
        }
        if ($os == self::OS_WINDOWS) {
            $filename = str_replace('/', '\\', $filename);
        }

        if ($os == self::OS_WINDOWS) {
            if ($host && $host !== 'localhost') return sprintf('\\\\%s\%s', $host, $filename);
            else return $filename;
        } else {
            return $this->buildStr();
        }
    }
1257109
protected function get_legacy_eventdata() {
        $eventdata = new \stdClass();
        $eventdata->modulename = 'assign';
        $eventdata->cmid = $this->contextinstanceid;
        $eventdata->itemid = $this->objectid;
        $eventdata->courseid = $this->courseid;
        $eventdata->userid = $this->userid;
        if (count($this->legacyfiles) > 1) {
            $eventdata->files = $this->legacyfiles;
        }
        $eventdata->file = $this->legacyfiles;
        $eventdata->pathnamehashes = array_keys($this->legacyfiles);
        return $eventdata;
    }
147788
private function getFileName()
    {
        --$this->currentFileIndex;
        do{
            ++$this->currentFileIndex;
            $fileName = $this->currentNoIndexFileName;
            if($this->currentFileIndex > 0)
            {
                $fileName .= '(' . $this->currentFileIndex . ')';
            }
            $fileName .= $this->currentFileExt;
        }while(is_file($fileName) && filesize($fileName) >= $this->maxSize);
        return $fileName;
    }
1310503
public function getFileName()
    {
        $filename = substr( strrchr( $this->elfinderFilePath, '/' ), 1 );
        $parts = explode('.',$filename);
        $last = array_pop($parts);
        $filename = str_slug(implode('_',$parts)) . '_' . time();
        return $filename  . '.' . $last;
    }
194174
public function getDisplayName()
	{
		if (isset($this->filename))
		{
			// If it is a dotfile the filename is '' and the extension will be the rest of the filename
			if ($this->filename == '' && isset($this->extension))
			{
				return '.' . $this->extension;
			}
			return $this->filename;
		}

		if (isset($this->basename))
		{
			return $this->basename;
		}

		if (isset($this->path))
		{
			$bits = explode('/', $this->path);
			return end($bits);
		}

		return '';
	}
986836
public function getUniqueFilename()
	{
		$pathInfo = pathinfo($this->filename);
		$filename = $pathInfo['filename'];
		$extension = $pathInfo['extension'];
		$increment = 1;
		while($this->fileExists($filename . "_" . $increment, $extension))
		{
			$increment++;
		}
		$this->filename = $filename . "_" . $increment . '.' . $extension;

		return $this;
	}
941525
public function getFileName()
    {
        if (null == $this->_storeName) {
            $this->_storeName = $this->getDefaultFileName();
        }
        return $this->_storeName;
    }
1035764
protected function getFileName()
    {
        if (null === $this->fileName) {
            $this->fileName = $this->lockDirectory.'/'.$this->applicationName.'.pid';
        }

        return $this->fileName;
    }
473737
protected function get_legacy_logdata() {
        if ($this->relateduserid == $this->userid) {
            $title = get_string('editsubmission', 'assign');
        } else {
            $user = $this->get_record_snapshot('user', $this->relateduserid);
            $title = get_string('editsubmissionother', 'assign', fullname($user));
        }
        $this->set_legacy_logdata('view submit assignment form', $title);
        return parent::get_legacy_logdata();
    }
884043
protected function get_legacy_logdata() {
        return array($this->courseid, 'course', 'loginas', '../user/view.php?id=' . $this->courseid . '&amp;user=' . $this->userid,
            $this->other['originalusername'] . ' -> ' . $this->other['loggedinasusername']);
    }
550249
public function toString()
    {
        $params = $this->toArray();
        $filename = $params['filename'];
        $extension = $params['extension'];
        unset($params['filename'], $params['extension']);

        ksort($params);
        $mapping = array_flip($this->argMapping);
        $defaults = $this->argDefaults;

        $nameArray = array();
        foreach($params as $key => $value){
            //remove value if as same as default setting
            if($value !== null && $value !== $defaults[$key]){
                $nameArray[$mapping[$key]] = $mapping[$key] . '_' . $value;
            }
        }
        $nameArray = $nameArray ? ',' . implode(',', $nameArray) : '';
        return $filename . $nameArray . '.' . $extension;
    }
1051860
protected function version()
    {
        $version = $this->argument('version');

        if (! $version) {
            return $this->latestVersion();
        }

        if (! ctype_digit($version)) {
            return $version;
        }

        $version = (int) $version;

        if ($version < 70) {
            return $this->legacyVersions[$version];
        }

        return trim(file_get_contents(
            sprintf($this->versionUrl, $version)
        ));
    }
667632
public function getExtension() {
		$filename = $this->getFilename();
		$pos = strrpos($filename, '.');
		if($pos === false || $pos === 0 || $pos >= strlen($filename) - 1) {
			return null;
		}
		return substr($filename, $pos + 1);
	}
871710
public function getFilename()
    {
        if ($handler = $this->filenameHandler) {
            return $handler($this);
        }

        if ($this->splitType === 'hour') {
            return $this->name . '.' . date('Ymd_H') . '.log';
        }

        return $this->name . '.' . date('Ymd') . '.log';
    }
832934
protected function get_legacy_logdata() {
        $logmessage = get_string('viewsubmissionforuser', 'assign', $this->relateduserid);
        $this->set_legacy_logdata('view submission', $logmessage);
        return parent::get_legacy_logdata();
    }
1284145
public function getUniqueName()
    {
        $key = 'uniq';

        // Lazy initialization
        if (!isset($this->container[$key])) {
            $extension = $this->getExtension();

            // If extension avaiable, use it
            if ($extension) {
                $name = sprintf('%s.%s', uniqid(), $extension);
            } else {
                // Otherwise just filename without extension
                $name = uniqid();
            }

            $this->container[$key] = $name;
        }

        return $this->container[$key];
    }
37712
protected function get_legacy_logdata() {
        if (empty($this->resourceslist)) {
            return null;
        }
        $logs = array();
        foreach ($this->resourceslist as $resourcename) {
            $logs[] = array($this->courseid, $resourcename, 'view all', 'index.php?id=' . $this->courseid, '');
        }
        return $logs;
    }