ajoute un fichier stocké sur disque à la liste des fichiers chargés
@param string $name
@param string $pathFile
@return ODDragNDrop|bool
348882
public function addLoadedFile(string $name, string $pathFile)
    {
        $properties                     = $this->getProperties();
        $loadedFiles                    = $properties['loadedFiles'];
        $names                          = array_column($loadedFiles, 'name');
        if (!in_array($name, $names)) {
            $key                        = '1ld';
            if (!empty($loadedFiles)) {
                $loadedFiles                = ksort($loadedFiles);
                /** @var array $loadedFiles */
                $key                        = ((int) array_key_last($loadedFiles) + 1).'ld';
            }
            $item                       = [];
            $item['name']               = $name;
            $item['pathFile']           = $pathFile;
            $item['mime']               = mime_content_type($pathFile);
//            $loadedFiles[$name]         = $pathFile;
            $loadedFiles[$key]          = $item;
            $properties['loadedFiles']  = $loadedFiles;
            $this->setProperties($properties);
            return $this;
        }
        return false;
    }
600205
public function storePubliclyAs($path, $name, $options = [])
    {
        $options = $this->parseOptions($options);

        $options['visibility'] = 'public';

        return $this->storeAs($path, $name, $options);
    }
1193204
public function addFile($name, $data) {
        $file = new File($this->getChild($name));
        $file->write($data);
        return $file;
    }
60656
public static function fileExtension($name, $realFile = false) {
		if ($realFile) {
			$result = pathinfo($name, PATHINFO_EXTENSION);
			if (empty($result)) {
				return false;
			}
		}

		return substr(strrchr($name, '.'), 1);
	}
76863
public function getFile($name = null, $index = 0, $default = false)
    {
        $files = $this->getFiles($name);

        if (isset($files[$index])) {
            return $files[$index];
        } else {
            return $default;
        }
    }
55031
private function createPageJs(string $name, array $data, string $pathFile)
    {
        $minifier = new Minify\JS("");

        foreach ($data as $datum) {
            if (in_array($datum['nome'], $this->param['js'])) {
                foreach ($datum['arquivos'] as $file) {
                    if ($file['type'] === "text/javascript")
                        $minifier->add($file['content']);
                }
            }
        }

        if (file_exists(PATH_HOME . $pathFile . "assets/{$name}.min.js"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.min.js"));
        elseif (file_exists(PATH_HOME . $pathFile . "assets/{$name}.js"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.js"));

        $minifier->minify(PATH_HOME . "assetsPublic/view/{$name}.min.js");
    }
289280
protected function findInPaths($name, $paths)
    {
        foreach ((array) $paths as $path) {
            foreach ($this->getPossibleViewFiles($name) as $file) {
                if (is_file($viewPath = $path . '/' . $file)) {
                    return $viewPath;
                }
            }
        }

        throw new InvalidArgumentException("View [$name] not found.");
    }
383297
private function getViewFile($name, $extension = 'html')
    {
        return $this->viewsConfiguration->getViewsPath($this->app->getBasePath()) . DIRECTORY_SEPARATOR . $name . '.' . $extension;
    }
458848
public static function any($path, $name, $namespaceOrController) {
        $item = new ConfigurationItem($path, $name, ['GET', 'POST', 'PUT', 'DELETE', 'HEAD'], $namespaceOrController);
        self::$configuration[] = $item;
        return $item;
    }
81017
public function subtree($path, string &$name = null, bool $create = false): ?self
    {
        $parts = $this->split($path);

        $dirOrFile = array_shift($parts);
        if (!count($parts)) {
            $name = $dirOrFile;
            $subtree = $this;
        } else {
            $exists = isset($this->subTrees[$dirOrFile]);
            if (!$exists && !$create) {
                $subtree = null;
                $name = null;
            } else {
                if (!$exists && $create) {
                    $this->subTrees[$dirOrFile] = new self();
                }
                $subtree = $this->subTrees[$dirOrFile]->subtree($parts, $name, $create);
            }
        }

        return $subtree;
    }
508540
public function newFileFromName($path, $name, $hashName = false){
        $info = pathinfo($name);
        $ext = isset($info['extension'])? ".{$info['extension']}":"";
        $name = $info['filename'];
        $n = $hashName?md5($name):$name;
        $file = new FileImpl("$path/$n$ext");
        $i = 0;
        while($file->exists()){
            $i++;
            $n = $hashName?md5($name.$i):"$name ($i)";
            $file = new FileImpl("$path/$n$ext");
        }
        return $file;

    }
936014
public function addPathHeader(string $name, $path)
    {
        return $this->add(new PathHeader($name, $path instanceof Address ? $path : new Address($path)));
    }
305535
public T addFile(final String name, final List<String> path, final byte[] newHash, final boolean isDirectory) {
        return addFile(name, path, newHash, isDirectory, null);
    }
748928
public function attachFromStorage($path, $name = null, array $options = [])
    {
        return $this->attachFromStorageDisk(null, $path, $name, $options);
    }
720948
public function addInstallMacroblock($name, $file, $url)
    {
        $macroblockElement = new InstallMacroblock($name, $file, $url);
        return $this->addElement($macroblockElement);
    }
1335461
public function resolveFile($name)
    {
        if($this->getStorageFacility() == null)
            return null;

        return $this->getStorageFacility()->resolveFile($this->getStorageFacilityParams(), $name);
    }
890871
public static function buildSwift($attachmentPath, $name)
    {
        $file = \Swift_Attachment::fromPath($attachmentPath);
        if (is_string($name)) {
            $file->setFilename($name);
        }

        return $file;
    }