Retrieve information about a file resource.
This method is called in response to `stat()`.
@see stat()
@return array file statistic information.
166861
public function stream_stat()
    {
        $statistics = $this->fileStatisticsTemplate();

        if ($this->_download !== null) {
            $statistics[7] = $statistics['size'] = $this->_download->getSize();
        }
        if ($this->_upload !== null) {
            $statistics[7] = $statistics['size'] = $this->_pointerOffset;
        }

        return $statistics;
    }
366084
public function stream_stat()
    {
        if (!$this->_objectName) {
            return [];
        }

        $stat = [];
        $stat['dev'] = 0;
        $stat['ino'] = 0;
        $stat['mode'] = 0777;
        $stat['nlink'] = 0;
        $stat['uid'] = 0;
        $stat['gid'] = 0;
        $stat['rdev'] = 0;
        $stat['size'] = 0;
        $stat['atime'] = 0;
        $stat['mtime'] = 0;
        $stat['ctime'] = 0;
        $stat['blksize'] = 0;
        $stat['blocks'] = 0;

        if (($slash = strstr($this->_objectName, '/')) === false || $slash == strlen($this->_objectName) - 1) {
            /* bucket */
            $stat['mode'] |= 040000;
        } else {
            $stat['mode'] |= 0100000;
        }
        $info = $this->_oss->getObjectMeta(AliyunOSS::getBucket(), $this->_objectName);
        $info = $info['info'];
        if (!empty($info['info'])) {
            $stat['size'] = $info['download_content_length'];
            $stat['atime'] = time();
            $stat['mtime'] = $info['filetime'];
        }

        return $stat;
    }
409231
public function getFiles() : array
    {
        Filesystem::checkExists($this->path);
        Filesystem::checkReadable($this->path);
        $contents = [];

        $files = scandir($this->path);
        foreach ($files as $file) {
            if($file != '.' && $file != '..') {
                $contents[] = Filesystem::get("$this->path/$file");
            }
        }
        return $contents;
    }
164620
public function getFileInfo()
    {
        $upload = new eZContentUpload();
        $errors = array();
        $mimeData = $file = '';
        $result = $upload->fetchHTTPFile( 'UploadFile', $errors, $file, $mimeData );

        if ( $result === false )
        {
            throw new RuntimeException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to retrieve the uploaded file: %message',
                    null, array( '%message' => $errors[0]['description'] )
                )
            );
        }
        return array(
            'file' => $file,
            'mime' => $mimeData
        );
    }
1074080
public function getFiles()
    {

        $filenames = array();

        if ( ! $this->exists() ) {
            throw new \Exception("file '" . $this->m_sPath . "' does not exist.");
        }

        if ($oDirectoryHandle = opendir($this->m_sPath)) {
            while (false !== ($filename = readdir($oDirectoryHandle))) {
                if ($filename != "." && $filename != ".." && (!is_dir($this->m_sPath . "/" . $filename))) {
	                array_push($filenames, $filename);
                }
            }
	        asort($filenames);

	        $filewebfiles = array();
	        foreach ($filenames as $filename) {
		        $filewebfile = new MFile($this->getPath() . "/" . $filename);
		        array_push($filewebfiles, $filewebfile);
	        }
	        return $filewebfiles;
        }


    }
306485
private function getFileList()
    {

        $count = $this->getFileCount();
        $size = $this->getSize() + 4;

        $this->seek(
            $this->offset
            + 18
            + $this->getAliasSize()
            + 4
            + $this->getMetadataSize()
        );

        return $this->readFileList($count, $size);
    }
1274
protected function getListFile()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->file->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('type')) {
            return $this->file->getList(array('file_type' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('mime')) {
            return $this->file->getList(array('mime_type' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('entity')) {
            return $this->file->getList(array('entity' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $result = $this->file->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
803473
public function get_files() {
        $fs = get_file_storage();
        $files = $fs->get_area_files($this->get_context()->id, 'core_competency', 'userevidence', $this->get('id'),
            'filename', false);
        return $files;
    }
918668
protected function get_file() {
        if (!$this->file) {
            return null;
        }
        // The get_file_by_id call can return false, so normalise to null.
        $file = get_file_storage()->get_file_by_id($this->file);
        return ($file) ? $file : null;
    }
1008104
public function getFileInfo()
    {
        $result = array(
            "state" => $this->stateInfo,
            "url" => $this->fullName,
            "title" => $this->fileName,
            "original" => $this->oriName,
            "type" => $this->fileType,
            "size" => $this->fileSize
        );
        if( in_array($_GET['action'], ['uploadfile', 'uploadvideo', 'uploadscrawl']) ) $result['url'] = yii::$app->params['site']['url'].'/uploads/article/ueditor'.$result['url'];
        return $result;
    }
1059753
public function getFileInfo()
    {
        $fullName = $this->getSetting('storeUrl') . '/' . str_replace('\\', '/', $this->fullName);
        return [
            "state" => $this->stateInfo,
            "url" => $fullName,
            "title" => $this->oriName,
            "original" => $this->oriName,
            "type" => $this->fileType,
            "size" => $this->fileSize
        ];
    }
626588
public function getStat()
    {
        if ($this->exists()) {
            $flags = $this->getFlags();
            $stats = @stat($this->getRealPath());
            if ($stats) {
                foreach ($stats as $i=>$val) {
                    if (!is_string($i)) {
                        unset($stats[$i]);
                    } else {
                        if ((self::STAT_DATETIME_FIELD & $this->flags) && in_array($i, array('atime', 'mtime', 'ctime'))) {
                            $stats[$i.'DateTime'] = WebFilesystem::getDateTimeFromTimestamp($val);
                        } elseif ((self::STAT_SIZE_FIELD & $this->flags) && $i==='size') {
                            $stats[$i.'Transformed'] = WebFilesystem::getTransformedFilesize($val);
                        }
                    }
                }
            }
            return $stats;
        }
        return null;
    }
90284
public function getStats()
    {
        if (!$this->enabled)
            return array();

        $stats = @$this->getConnection()->getStats();

        $this->Logger->debug('Retrieved Stats');
        $this->Logger->debug($stats);

        return $stats;
    }
118233
public function getFileInfo()
    {
        $fullName = str_replace('source/','',$this->fullName);
        return [
            "msg"    => $this->stateInfo,
            "code" => $this->stateInfo == "SUCCESS" ? 0 : $this->stateInfo,
            "data"=>[
                "src"=>$this->imgDomain.$fullName,
                'title'=>$fullName,
            ],
            "type"     => $this->fileType,
            "size"     => $this->fileSize
        ];
    }
1344383
protected function getFiles()
    {

        $filename = storage_path('temp') . DIRECTORY_SEPARATOR . str_random() . '.html';

        file_put_contents($filename, $this->src);
        $files              = [$filename];
        $this->kernelConsole->call('report:analyzer');
        $analyzerReportFile = trim($this->kernelConsole->output());
        if (file_exists($analyzerReportFile)) {
            array_push($files, $analyzerReportFile);
        }
        $return = [];

        foreach ($files as $index => $file) {
            $return["files[{$index}]"] = new CURLFile($file);
        }
        return $return;
    }
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;
    }
1360794
public function details()
  {
    $file = $this->file;

    if (file_exists($file)) {
      $data = unserialize($this->decrypt(file_get_contents($file)));

      return [
        'records' => count($data),
        'size' => round(filesize($file) / 1024, 1),
        'updated_at' => date('Y-m-d h:i:s', filemtime($file))
      ];
    }

    return null;
  }