Gets the associated File resource.
@return File
344199
public function getFile(){
        if(!$this->isPropertyAvailable('File')){
            $this->setProperty("File", new File($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "File")),false);
        }
        return $this->getProperty("File");
    }
1147502
public function getFiles()
    {
        if (!$this->fileSetFiles) {
            $this->populateFiles();
        }
        $files = array();
        foreach ($this->fileSetFiles as $file) {
            $files[] = ConcreteFile::getByID($file->fID);
        }

        return $files;
    }
1366030
protected function getUploadedResource()
    {
        if ($this->getMappingResultsForProperty()->hasErrors()) {
            return null;
        }
        $resourceObject = $this->getPropertyValue();
        if ($resourceObject instanceof PersistentResource) {
            return $resourceObject;
        }
        return $this->propertyMapper->convert($this->getValueAttribute(), PersistentResource::class);
    }
717524
public function getFiles() {
        $dir = $this->getDirOutput();
        $finder = new \Symfony\Component\Finder\Finder();
        $finder->files()->in($dir);
        return $finder;
    }
698370
public static function getFileSystem()
    {
        if (self::$fs === null) {
            switch (Phing::getProperty('host.fstype')) {
                case 'UNIX':
                    self::$fs = new UnixFileSystem();
                    break;
                case 'WINDOWS':
                    self::$fs = new WindowsFileSystem();
                    break;
                default:
                    throw new IOException("Host uses unsupported filesystem, unable to proceed");
            }
        }

        return self::$fs;
    }
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);
    }
594360
public function getFile()
    {
        if ($this->file && get_class($this->file) != $this->file->ClassName) {
            // If the class is Image and the ClassName says it should be a CloudImage, just reload it
            $this->file = DataObject::get($this->file->ClassName)->byID($this->file->ID);
        }

        return $this->file;
    }
1355900
public function getFileUrl() {

		if( $this->changed ) {

			return Yii::$app->fileManager->uploadUrl . '/' . CoreProperties::DIR_TEMP . $this->directory . "/" . $this->name . "." . $this->extension;
		}
		else if( $this->id > 0 ) {

			return Yii::$app->fileManager->uploadUrl . '/' . $this->url;
		}

		return "";
	}
1084098
private function getImageFiles()
    {
        if ($this->imageFiles === null) {
            // Get a list of images.
            $this->imageFiles = $this->filesystem
                ->find()
                ->in('files://')
                ->name('/\.jpe?g$/')
                ->name('*.png')
                ->toArray()
            ;
        }

        return $this->imageFiles;
    }
1061365
public function getFileResource()
    {
        $app = Application::getFacadeApplication();
        $cf = $app->make('helper/concrete/file');
        $fs = $this->getFile()->getFileStorageLocationObject()->getFileSystemObject();
        $fo = $fs->get($cf->prefix($this->fvPrefix, $this->fvFilename));

        return $fo;
    }
1356156
private function getFileHandler()
    {
        if (is_null($this->fileHandler)) {
            $path = rtrim($this->path, '/');
            $this->fileHandler = new FileHandler($this->rootDir.$path);
        }
        
        return $this->fileHandler;
    }
989353
public function getFileObject() {
        if ($this->getAttrib('data-type') === Garp_File::TYPE_IMAGES) {
            $file = new Garp_Image_File();
        } else {
            $file = new Garp_File();
        }
        return $file;
    }
981780
public function getBytes()
    {
        if ($this->isDirty && $this->bytes) {
            return $this->bytes;
        }
        if ($this->isDirty && $this->filename) {
            return file_get_contents($this->filename);
        }
        if ($this->mongoGridFSFile instanceof \MongoGridFSFile) {
            return $this->mongoGridFSFile->getBytes();
        }
        return null;
    }
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;
    }
1061180
public function getFile()
    {
        if (null !== $this->file) {
            return $this->file;
        }

        /** @var File $file */
        foreach ($this->entity->getFiles() as $file) {
            // currently only one file per media exists
            $this->file = $file;

            return $this->file;
        }

        throw new FileNotFoundException($this->entity->getId());
    }
150255
public function getFilepath()
    {
        if (isset($this->dirPath)) {
            $filepath = $this->dirPath .'/'.$this->filename;
        } else {
            $fileSystem = $this->createNew(FileSystem::class);
            $filepath   = $fileSystem->getCurrentWorkingDirectory() .'/'.$this->filename;    
        }
        return $filepath;        
    }
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;
    }