files = array_udiff($files, $filesToIgnore, 'strcasecmp'); // Remove the ignored files from the list, case-insensitive. return $this->files; // Return the list of files. } /** * Get the list of character save files. * * @return mixed The list of character save files. */ public function getSaveFiles() { $glob = glob($_SESSION['savepath'] . '*.d2s'); // Get a list of all ".d2s" files in the specified save path. foreach ($glob as $g) { $this->charFiles[] = basename($g); // Add the base name of each file to the $charFiles array. } return $this->charFiles; // Return the list of character save files. } }