Adds one or more files to the staging area

@param   array   $file       The file(s) to be added or NULL to add all new and/or changed files to the staging area
@param   boolean $force
768011
public function add(array $file = null, $force = false)
    {
        $args   = array();
        if ($force) {
            $args[]  = '--force';
        }
        if ($file !== null) {
            $args[] = '--';
            $args   = array_merge($args, array_map(array($this, 'translatePathspec'), $this->resolveLocalPath($file)));
        } else {
            $args[] = '--all';
        }

        /** @var $result CallResult */
        $result = $this->getGit()->{'add'}($this->getRepositoryPath(), $args);
        $result->assertSuccess(sprintf('Cannot add "%s" to "%s"',
            ($file !== null) ? implode(', ', $file) : '*', $this->getRepositoryPath()
        ));
    }
266955
public function loadFile( $file ) {

		if ( empty( $this->files ) )
			$this->files = $this->readDirRecursive(
				$this->base_dir,
				'*' . $this->extension
			);

		if ( ! in_array( $file, $this->files ) )
			return FALSE;

		require_once $file;

		return TRUE;
	}
119896
protected function addToParseQueue($file)
    {
        $this->states[$file] = self::PARSE;

        if (!isset($this->documents[$file])) {
            $this->parseQueue[$file] = $file;
        }
    }
527231
function addFile(FileUpload $file)
	{
		$a = func_get_args();
		Debugger::log(__CLASS__ . ": " . __METHOD__ . "; args: " . print_r($a, true));
	}
565050
public function addStyle($file) {
        if (is_array($file)) {
            foreach ($file as $f) {
                if (!in_array($f, $this->sytles)) {
                    $this->sytles [] = $f;
                }
            }
        } else if (!in_array($file, $this->sytles)) {
            $this->sytles [] = $file;
        }

        return $this;
    }
271622
public function addFiles(array $files)
    {
        $added_files = 0;
        try {
            foreach ($files as $localName => $filename) {
                if (!is_null($filename)) {
                    $this->sevenZip->addEntry($filename);
                    $this->sevenZip->renameEntry($filename, $localName);
                    $added_files++;
                }
            }
        } catch (Exception $e) {
            throw new Exception('Could not modify archive: '.$e->getMessage(), $e->getCode(), $e);
        }
        return $added_files;
    }
1319221
public function add($file)
    {
        if ($file instanceof SplFileInfo) {
            throw InvalidArgumentException::create(
                sprintf(
                    '%1$s/FileBag|%1$s/File[]|%1$s/File',
                    __NAMESPACE__
                ),
                $file
            );
        }

        return parent::add($file);
    }
977876
public function addSuf($file, $suf) {
		if(is_array($suf)) {
			$suf = implode('_', $suf);
		}
		if(!empty($file)) {
			if(is_array($file)) {
				foreach($file as $type => $path) {
					$file[$type] = $this->createSuf($path, $suf);
				}
			} else {
				$file = $this->createSuf($file, $suf);
			}
		}

		return $file;
	}
38580
public function init($file)
	{
		try {
			
			$this->load($file);

		} catch (Exceptions\FileNotExists $e) {

			$this->create($file);
		}
	}
287856
final protected function addFilesToMultipartBuilder(Builder $builder, array $files = []): void
    {
        foreach ($files as $key => $file) {
            if (! \is_null($file)) {
                $builder->addResource($key, fopen($file, 'r'));
            }
        }
    }
250147
public function addFiles($files)
    {
        if ($files instanceof FileBag) {
            $this->fileBag = $files;
            return;
        }

        if (is_array($files)) {
            $this->fileBag = new FileBag($files);
            return;
        }
        throw new BadFileDataException('The attempt at adding files to the file loader failed, due to the files not
        being a FileBag Object or an array of SplInfoObjects.');
    }
712899
public function init($file, array $data = null)
    {
        if ($data === null) {
            $data = $this->setJsonDefaults([]);
        }
        $this->app['filesystem']->write($file, Json::dump($data, Json::HUMAN));
    }
172691
public function addPostFile($key, $file, $content = null)
    {
        $this->setMethod('POST');
        $this->setBody(null);
        if ($content === null && is_file($file)) {
            $content = @file_get_contents($file);
        }
        $this->_postFiles[$key] = [basename($file), $content];
    }
402189
public function addResource(string $file): void
    {
        $contents = file_get_contents($file);
        
        if ($contents === false) {
            throw new \RuntimeException("Error reading file at $file.");
        }
        
        $this->processData(json_decode($contents, true));
    }
1309044
public function load(string $file, array $data = null): void
    {
        if ($data != null) {
            extract($data);
        }
        include $file;
    }
21885
public function addFile($file)
    {
        if (is_string($file)) {
            $file = array($file);
        }

        if (is_array($file)) {
            foreach ($file as $name) {
                if (!isset($this->_files[$name]) && !empty($name)) {
                    $this->_files[$name] = $name;
                }
            }
        }

        return $this;
    }
720420
public function addFile($file, $strip = true)
    {
        $realfile = realpath($this->path . DIRECTORY_SEPARATOR . $file);
        $this->files[$file] = [$realfile, (bool) $strip];
    }