Sets oxefile__oxstorehash with file hash.
Moves file to desired location and change its access rights.

@param int $sFileIndex File index

@throws oxException Throws exception if file wasn't moved or if rights wasn't changed.
513975
public function processFile($sFileIndex)
    {
        $aFileInfo = \OxidEsales\Eshop\Core\Registry::getConfig()->getUploadedFile($sFileIndex);

        $this->_checkArticleFile($aFileInfo);

        $sFileHash = $this->_getFileHash($aFileInfo['tmp_name']);
        $this->oxfiles__oxstorehash = new \OxidEsales\Eshop\Core\Field($sFileHash, \OxidEsales\Eshop\Core\Field::T_RAW);
        $sUploadTo = $this->getStoreLocation();

        if (!$this->_uploadFile($aFileInfo['tmp_name'], $sUploadTo)) {
            throw new \OxidEsales\Eshop\Core\Exception\StandardException('EXCEPTION_COULDNOTWRITETOFILE');
        }
    }
826890
public function copyTo(PhingFile $destFile)
    {
        $fs = FileSystem::getFileSystem();

        if ($fs->checkAccess($this) !== true) {
            throw new IOException("No read access to " . $this->getPath() . "\n");
        }

        if ($fs->checkAccess($destFile, true) !== true) {
            throw new IOException("File::copyTo() No write access to " . $destFile->getPath());
        }

        $fs->copy($this, $destFile);
    }
122690
private function setXliffDirectory(InputInterface $input, OutputInterface $output)
    {
        $this->txlang = $input->getOption('xliff');

        if ($this->txlang === null) {
            $this->txlang = $this->getTransifexConfigValue('/languages_tx');

            if ($this->txlang === null) {
                throw new \RuntimeException('Error: unable to determine transifex root folder.');
            }
            $this->writelnVerbose($output, sprintf('<info>automatically using xliff folder: %s</info>', $this->txlang));
        }
    }
676156
public function setRevisionsPassword($pValue = '', $pAlreadyHashed = false)
    {
        if (!$pAlreadyHashed) {
            $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue);
        }
        $this->revisionsPassword = $pValue;
        return $this;
    }
348484
private void setFileHandle() {
        byte[] fileHandle = null;
        if (_isRootFile) {
            fileHandle = getNfs().getRootFileHandle();
        } else {
            try {
                if (getParentFile().getFileHandle() != null) {
                    fileHandle = getNfs().wrapped_getLookup(makeLookupRequest()).getFileHandle();
                }
            } catch (IOException e) {
                // do nothing, this will be a common exception
            }
        }
        setFileHandle(fileHandle);
    }
1146507
public function setActiveSheetIndex($pIndex = 0)
    {
    		$numSheets = count($this->_workSheetCollection);

        if ($pIndex > $numSheets - 1) {
            throw new PHPExcel_Exception(
            	"You tried to set a sheet active by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}."
            );
        } else {
            $this->_activeSheetIndex = $pIndex;
        }
        return $this->getActiveSheet();
    }
635936
private function _setStorageAdapter(string $adapterName) : void
    {
        $adapterClassName = self::STORAGE_MAP[$adapterName] ?? $adapterName;

        if (!InterfaceHelper::implementsInterface($adapterClassName, StorageInterface::class))
        {
            throw new UnknownStorageAdapterException($adapterClassName, \array_values(self::STORAGE_MAP));
        }

        $this->_storage = new $adapterClassName($this->_config);
    }
831766
public function process(File $sniffedFile, $index)
    {
        if (!$this->hasMethodDocBlock($sniffedFile, $index))
        {
            return;
        }

        $numberOfLineFeeds = $this->numberOfLineFeedsBetweenDocBlockAndDeclaration($sniffedFile, $index);
        if ($numberOfLineFeeds > 1)
        {
            $this->addWarning($sniffedFile, $index, 'No empty lines between a method declaration and its docblock.');
        }
        elseif ($numberOfLineFeeds === 0)
        {
            $this->addWarning($sniffedFile, $index, 'The method and its docblock can\'t be in the same line.');
        }
    }
850182
public function setIndex($index)
    {
        if ($this->index !== $index) {
            $this->index = $index;
            $this->addOrUpdate();
        }
    }
952822
protected function addSpace(File $phpcsFile, int $index): void
    {
        if ($phpcsFile->fixer->enabled !== true) {
            return;
        }
        $phpcsFile->fixer->addContent($index, ' ');
    }
1209423
def setCurrentIndex(self, index):
        
        if 0 <= index and index < len(self._stack):
            self._blockStack = True
            self._index = index
            self.emitCurrentChanged()
            self._blockStack = False
            return True
        return False
148290
protected void setReadingPosition(int recordIndex, int byteIndex) throws IOException {
		if (this.seekEnabled) {
			this.nextExpectedRecordIndex = recordIndex;
			this.buffer.position(byteIndex);
		} else {
			throw new SeekOperationDisabledException();
		}
	}
414840
protected function stash_file(array $filerecord) {
        $this->converter->set_stash('files', $filerecord, $filerecord['id']);
        $this->fileids[] = $filerecord['id'];
    }
834781
public function setDestfile($destfile)
    {
        if (is_string($destfile)) {
            $this->destfile = new PhingFile($destfile);
        } else {
            $this->destfile = $destfile;
        }
    }
1049512
public function setSessionIndex(string $sessionIndex = null) : void
    {
        if (is_null($sessionIndex)) {
            $this->sessionIndexes = [];
        } else {
            $this->sessionIndexes = [$sessionIndex];
        }
    }
735573
private function hasMethodDocBlockDescription(File $sniffedFile, $index)
    {
        $indexOfOpeningDocBlock = $sniffedFile->findPrevious([T_DOC_COMMENT_OPEN_TAG], $index);
        $indexOfClosingDocBlock = $sniffedFile->findPrevious([T_DOC_COMMENT_CLOSE_TAG], $index);

        $hasDescription = false;
        for ($i = $indexOfOpeningDocBlock + 1; $i < $indexOfClosingDocBlock; $i++)
        {
            if (!$this->isCommentWhitespaceToken($sniffedFile, $i) && !$this->isCommentStartToken($sniffedFile, $i))
            {
                $hasDescription = $this->isCommentTextToken($sniffedFile, $i);
                break;
            }
        }

        return $hasDescription;
    }
254231
public void setIndex(int index) {
        ElementBase parent = getParent();
        
        if (parent == null) {
            CWFException.raise("Element has no parent.");
        }
        
        int currentIndex = parent.children.indexOf(this);
        
        if (currentIndex < 0 || currentIndex == index) {
            return;
        }
        
        parent.moveChild(currentIndex, index);
    }