Returns the array of attached files.

@return \stored_file[]
486023
public function get_files() {
        // The files array can contain stored file ids, so we need to get instances if asked.
        foreach ($this->files as $id => $listfile) {
            if (is_numeric($listfile)) {
                $fs = get_file_storage();

                if ($file = $fs->get_file_by_id($id)) {
                    $this->files[$id] = $file;
                } else {
                    unset($this->files[$id]); // Index is out of date and referencing a file that does not exist.
                }
            }
        }

        return $this->files;
    }
1034708
public function getFilesInUse()
    {
        $list = ArrayList::create();

        // Check SiteTreeFileExtension
        if ($this->owner instanceof Folder) {
            // Join on tracking table
            $parents = static::nestedFolderIDs($this->owner->ID);
            $linkQuery = FileLink::get()->sql($linkParams);
            $list = File::get()->filter('ParentID', $parents)
                ->innerJoin(
                    "({$linkQuery})",
                    '"File"."ID" = "FileLinkTracking"."LinkedID"',
                    'FileLinkTracking',
                    20,
                    $linkParams
                );
        }

        // Allow extension
        $this->owner->extend('updateFilesInUse', $list);
        return $list;
    }
255078
protected function getDeltasFilesArray()
    {
        $files = [];

        $baseDir = realpath($this->dir);
        $dh = opendir($baseDir);

        if ($dh === false) {
            return $files;
        }

        $fileChangeNumberPrefix = '';
        while (($file = readdir($dh)) !== false) {
            if (preg_match('[\d+]', $file, $fileChangeNumberPrefix)) {
                $files[(int) $fileChangeNumberPrefix[0]] = $file;
            }
        }

        return $files;
    }
1090249
protected function defaultUploadedFiles()
    {
        $files = [];
        foreach ($_FILES as $class => $info) {
            $files[$class] = [];
            $this->populateUploadedFileRecursive($files[$class], $info['name'], $info['tmp_name'], $info['type'], $info['size'], $info['error']);
        }

        return $files;
    }
168921
public function listFiles(): array {

        try {
            return array_column(
                array_map(function($key, $archive) {
                    return [ "key" => $key, "files" => $archive->listFiles() ];
                }, array_keys($this->zip_archives), $this->zip_archives),
            "files", "key");
        } catch (ZipException $ze) {
            throw $ze;
        }

    }
162957
private function dumpFiles()
    {
        $files = [];

        foreach(File::allFiles(Config::dumpPath()) as $dumpFile) {
            $files[] = $dumpFile->getRealpath();
        }

        sort($files);

        return $files;
    }
209992
public function getFileList()
	{
		$list	= array();
		foreach( $this->files as $file )
			$list[$file['name']]	= $file['size'];
		return $list;
	}
83737
public function getAllFiles()
    {
        $ext   = $this->formatter->getFileExtension();
        $files = array();
        $this->getFilesRecursive($this->path, $files, $ext);

        return $files;
    }
656442
public function getFiles()
    {
        $files = [];
        //import z elementów File
        foreach ($this->getElements() as $element) {
            if (!($element instanceof \Mmi\Form\Element\File)) {
                continue;
            }
            /* @var $element \Mmi\Form\Element\File */
            if (!$element->isUploaded()) {
                continue;
            }
            $files[$element->getName()] = $element->getFiles();
        }
        return $files;
    }
869446
public function attachmentMessages()
    {
        $result = [];
        foreach ($this->entries as $entry) {
            foreach ($entry->messages as $entryMessage) {
                if ($entryMessage->isMessage) {
                    if ($entryMessage->message->hasAttachments) {
                        $result[] = $entryMessage->message;
                    }
                }
            }
        }
        return collect($result);
    }
218538
public function getFileHandlersAsArray()
    {

        // initialize the array for the file handlers
        $fileHandlers = array();

        // iterate over the file handlers nodes and sort them into an array
        /** @var \AppserverIo\Appserver\Core\Api\Node\FileHandlerNode $fileHandler */
        foreach ($this->getFileHandlers() as $fileHandler) {
            $fileHandlers[$fileHandler->getExtension()] = array(
                'name' => $fileHandler->getName(),
                'params' => $fileHandler->getParamsAsArray()
            );
        }

        // return what we got
        return $fileHandlers;
    }
1288525
public function getFiles() : array
    {
        if(!$this->_isLoaded) {
            $this->load();
        }

        return array_map(function($file) {
            return new File($this->getPath(). DIRECTORY_SEPARATOR .$file);
        }, $this->_files);
    }
801967
protected function _getIncludedFiles()
    {
        if (null !== $this->_includedFiles) {
            return $this->_includedFiles;
        }

        $this->_includedFiles = get_included_files();
        sort($this->_includedFiles);
        return $this->_includedFiles;
    }
767208
public function getList()
    {
        $identifiers = array();

        $fileList = $this->filesystem->listFiles($this->getPath());
        foreach ($fileList as $file) {
            $identifiers[] = $file['filename'];
        }
        return $identifiers;

    }
1188230
public function getFiles()
    {
        if(!$this->isPropertyAvailable('Files')){
            $this->setProperty("Files", new FileCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "Files")));
        }
        return $this->getProperty("Files");
    }
539684
public function getList()
    {
        $result = [];
        foreach (config('crude_special_files.files') as $key)
            $result[$key] = [
                'key' => $key,
                'label' => $this->getLabel($key),
                'data' => $this->getFileData($key)
            ];

        return $result;
    }
472304
protected function getFiles()
    {
        if (!$this->files) {
            $files = array();
            if ($this->batch) {
                $files = $this->batch->getSessionVariable('files');
            } else {
                $files = $this->_session->files;
            }
            if (!is_array($files)) {
                $files = array();
            }
            $this->files = $files;
        }
        return $this->files;
    }