Files setter.
Input should like [
['file' => (FileObject), ['type' => (array or value)]]
]

@param mixed
978556
public function setFilesAttribute($value)
    {
        if (!$this->exists && $value) {
            return $this->attributes['files'] = $value;
        } elseif (!$this->exists) {
            return;
        }

        $filesIds = $this->files()->whereNotNull('mediables.type')->pluck('id');

        $this->files()->detach($filesIds);

        collect($value)->each(function ($value) {
            $id = $value['file']['id'];
            $type = is_array($value['type']) ?  $value['type']['value'] : $value['type'];

            $this->files()->attach($id, compact('type'));
        });

        $this->touch();
    }
102740
public void setFileTypes(final String[] types) {
		if (types == null) {
			setFileTypes((List<String>) null);
		} else {
			setFileTypes(Arrays.asList(types));
		}
	}
656101
public function setFilename($filename)
    {
        if (is_array($filename) && isset($filename['name'])) {
            $this->filename = $filename['name'];
        } else {
            $this->filename = $filename;
        }
    }
227462
def upload(object, options = {})
      if file?(object)           then upload_file(object, options)
      elsif object.is_a?(Array)  then upload_files(object, options)
      elsif object.is_a?(String) then upload_url(object, options)
      else
        raise ArgumentError, "Expected input to be a file/Array/URL, given: `#{object}`"
      end
    end
865878
public function setFile($file = null)
    {
        if (is_null($file)) {
            $this->file = ['name' => date('Ymd-His'), 'part' => 1];
        } else {
            if (!array_key_exists("name", $file) && !array_key_exists("part", $file)) {
                $this->file = $file['1'];
            } else {
                $this->file = $file;
            }
        }
        return $this;
    }
1035270
public void setInput(final String input) {
        if (input == null) {
            throw (new IllegalArgumentException(
                    "You must provide a COBOL source folder or file"));
        }
        File file = new File(input);
        if (file.exists()) {
            if (file.isDirectory() && file.list().length == 0) {
                throw new IllegalArgumentException("Folder " + input
                        + " is empty");
            }
        } else {
            throw new IllegalArgumentException("Input file or folder " + input
                    + " not found");
        }
        _input = file;
    }
38613
static function set() {
		$info = debug_backtrace();
		self::$data[] = [
			'time' => time(),
			'microtime' => microtime(true),
			'text' => (count($info[0]['args']) ? $info[0]['args'] : '' ),
			'file' => $info[0]['file'],
			'line' => $info[0]['line'],
		];
    }
514221
private static function normaliseUplaod(array $files)
    {
        $output = [];
        foreach ($files as $key => $value) {
            if ($value instanceof UploadedFileInterface) {
                $output[ $key ] = $value;
            } elseif (is_array($value) && isset($value[ 'tmp_name' ])) {
                $output[ $key ] = UploadedFile::create($value);
            } elseif (is_array($value)) {
                $output[ $key ] = self::normaliseUplaod($value);
            } else {
                throw new \InvalidArgumentException('The input parameter is not in the correct format.');
            }
        }

        return $output;
    }
910550
protected function prepareArrayBasedFileInput(&$uploads, $key, $file)
    {
        preg_match_all('/([^\[\]]+)/', $key, $segments);

        $segments = array_reverse($segments[1]);

        $newKey = array_pop($segments);

        foreach ($segments as $segment) {
            $file = [$segment => $file];
        }

        $uploads[$newKey] = $file;

        unset($uploads[$key]);
    }
641234
public function set(array $files)
    {
        if (!empty($files)) {
            foreach ($files as $_file) {
                $this->add($_file);
            }
        }
        return $this;
    }
1220903
private function checkFiles(array $files) : void
    {
        foreach ($files as $value) {
            if (is_array($value)) {
                $this->checkFiles($value);
            } elseif (! $value instanceof UploadedFile) {
                $type = is_object($value) ? get_class($value) : gettype($value);

                throw new \InvalidArgumentException('Expected ' . UploadedFile::class . ' or array, got ' . $type);
            }
        }
    }
11088
public function transform($value)
    {
        if (is_array($value)) {
            $value = $value[FileType::UPLOAD_FIELDNAME];
        }

        try {
            return array(
                FileType::UPLOAD_FIELDNAME => new File(call_user_func($this->callback, $value, $this->property))
            );
        } catch (FileNotFoundException $e) {
            return null;
        }
    }
801931
function parse( $inputFiles = false, $iniFile = false, $reset = true, $placement = false )
    {
        if ( $inputFiles === false or
             $iniFile === false )
        {
            eZDebug::accumulatorStart( 'ini_parse_find_files', 'Ini load', 'Find INI Files2' );
            $this->findInputFiles( $inputFiles, $iniFile );
            eZDebug::accumulatorStop( 'ini_parse_find_files' );
        }

        if ( $reset )
            $this->reset();

        foreach ( $inputFiles as $inputFile )
        {
            if ( file_exists( $inputFile ) )
            {
                $this->parseFile( $inputFile, $placement );
            }
        }
    }
1164742
public function withInput( array $input = null )
	{
		$input = $input ?: $this->request->input();

		$this->session->flashInput( $this->removeFilesFromInput( $input ) );

		return $this;
	}
456363
def file_set_properties(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/setProperties' % object_id, input_params, always_retry=always_retry, **kwargs)
1122768
private function setInput()
    {
        $this->inputFile = $_FILES[$this->field]['name'];
        $this->inputHash = hash_file('md5', $_FILES[$this->field]['tmp_name']);
    }
106358
private function setFileAction()
    {
        array_push($this->actions, 'file');

        $this->addForm = array_diff($this->addForm, ['files']);
        $this->editForm = array_diff($this->addForm, ['files']);

        $this->setModelDefaults('files', []);
        $this->setColumnFormat('files', 'files');

        return $this;
    }