@param string $name path/to.com/file

@return array [Path, ToCom, File]
492186
private function fileNameToNamespaceParts(string $name)
    {
        $name = preg_replace('/(.*)(\.[\w\d]+)$/', '$1', $name);
        return array_map(function ($e) {
            $e = ucfirst($e);
            $e = implode("", array_map('ucfirst', explode(".", $e)));
            $e = implode("", array_map('ucfirst', explode("-", $e)));
            return $e;
        }, explode('/', $name));
    }
710324
protected function extractFromUploaded($name)
    {
        $modelID = str_replace('\\', '_', get_class($this));
        if (isset($_FILES[$modelID]['tmp_name'][$name]) && 0 == $_FILES[$modelID]['error'][$name]) {
            return [
                'name'     => $_FILES[$modelID]['name'][$name],
                'tmp_name' => $_FILES[$modelID]['tmp_name'][$name],
                'type'     => $_FILES[$modelID]['type'][$name],
                'size'     => $_FILES[$modelID]['size'][$name]
            ];
        } else {
            return null;
        }
    }
212707
public function getArguments($name)
    {
        if (null === $this->data) {
            $this->initializeProfile();
        }

        if (!isset($this->data['arguments'][$name])) {
            return array();
        }

        $arguments = array();
        foreach ($this->data['arguments'][$name] as $argument => $cost) {
            $arguments[$argument] = new Cost($cost);
        }

        return $arguments;
    }
1246876
public function getStorageServiceKeys($name)
    {
        Validate::isString($name, 'name');
        Validate::notNullOrEmpty($name, 'name');

        $context = new HttpCallContext();
        $context->setMethod(Resources::HTTP_GET);
        $context->setPath($this->_getStorageServiceKeysPath($name));
        $context->addStatusCode(Resources::STATUS_OK);

        $response = $this->sendHttpContext($context);
        $parsed = $this->dataSerializer->unserialize($response->getBody());

        return GetStorageServiceKeysResult::create($parsed);
    }
789449
public function getHeaderLines(string $name): array {
        $key = strtolower($name);
        $result = isset($this->headers[$key]) ? $this->headers[$key] : [];
        return $result;
    }
1177840
function getFiles($folder, $name)
    {
        $filesArray = array();
        $files = Folder::files($folder, null, false, true);

	    $path = JFusionFramework::getPluginPath($name);

        foreach ($files as $file) {
            $file = str_replace($path . '/', '', $file);
	        $file = str_replace($path . '\\', '', $file);
            $data = file_get_contents($file);
            $filesArray[] = array('name' => $file, 'data' => $data);
        }
        $folders = Folder::folders($folder, null, false, true);
        if (!empty($folders)) {
            foreach ($folders as $f) {
                $filesArray = array_merge($filesArray, $this->getFiles($f, $name));
            }
        }
        return $filesArray;
    }
185026
public function getFieldAsArray(string $name): array
    {
        $result = $this->getFieldDefinition($name);

        $result['name'] = $name;

        if (empty($result['caption'])) {
            $result['caption'] = $this->_($result['name']);
        }

        $value = $this->$name;
        $type = @$result['type'];

        if (($type == 'date' || $type == 'datetime' || $type == 'time') && is_object($value)) {
            $value = $value->format($this->translate('form.' . $type));
        }

        $result['value'] = $value;
        $result['uid'] = 'id' . uniqid();

        if (isset($result['options']) && is_array($result['options'])) {
            $options = array();

            foreach ($result['options'] as $option => $label) {
                $options[] = array('option' => $option, 'label' => $label);
            }

            $result['options'] = $options;
        }

        return $result;
    }
758227
protected function getDestenationFile($name, $path)
    {
        if (!empty($path)) {
            $path = Helpers::getPathWithSlash(ucfirst($path));
        }

        return app_path(Config::getModelsPath($path . $name . '.php'));
    }
1153689
protected function getKeyPathAndFilename($name)
    {
        return Utility\Files::concatenatePaths([$this->getPath(), $this->checkKeyName($name)]);
    }
863179
public static function file( $name, & $exists = false )
	{
		if( !defined("APP_DIR") )
		{
			return [];
		}

		$file = APP_DIR . "config" . DIRECTORY_SEPARATOR . $name . '.php';
		if( file_exists( $file ) )
		{
			$data = Helper::includeImport($file);
			$exists = true;
		}

		if( ! isset( $data ) || ! is_array( $data ) )
		{
			$data = [];
		}

		return $data;
	}
1239836
public function getHeaderAsArray(string $name) : array
    {
        $name = strtolower($name);

        return isset($this->headers[$name]) ? $this->headers[$name] : [];
    }
949972
public function getFile(string $name)
    {
        $contentArea = $this->content->getFile($name);

        if ($contentArea) {
            return $contentArea->file;
        }

        return null;
    }
202057
public function receive($name)
    {
        $contentDisposition = (string) $this->request->header('content-disposition');
        if (empty($contentDisposition) === true) {
            return $this->request->file($name);
        }

        list($start, $end, $total) = $this->parseContentRange();
        $originalName = $this->getOriginalName($contentDisposition);
        $mimeType = $this->getMimeType($originalName);
        $uuid = $this->request->get('token');
        $completed = $end >= $total - 1;

        $chunkFile = $this->createChunkFile($originalName, $mimeType, $uuid);
        $chunkFile->appendStream('php://input', $start);

        return $completed === true
            ? $chunkFile->createUploadedFile()
            : $chunkFile->throwException([
                'files' => [
                    'name' => $originalName,
                    'size' => $end,
                    'type' => $chunkFile->getMimeType(),
                ],
            ], ['X-Last-Known-Byte' => $end]);
    }
564570
public function find( $name )
    {
        $name = (string) $name;
        $path = $this->getSavePath();

        if ( ! is_file( $path . $name ) )
        {
            return null;
        }

        return $this->createStructure( array(
            'name' => $name,
            'code' => @ file_get_contents( $path . $name ),
        ) );
    }
1265602
protected function getPathFromExtensionName(string $name): ?string
    {
        $finder = $this->app->make('orchestra.extension.finder');
        $files = $this->app->make('files');

        if ($name === 'app') {
            $basePath = $this->app->basePath();
        } else {
            $basePath = \rtrim($this->app->make('orchestra.extension')->option($name, 'path'), '/');
            $basePath = $finder->resolveExtensionPath($basePath);
        }

        $paths = ["{$basePath}/public", "{$basePath}/resources/public"];

        foreach ($paths as $path) {
            if ($files->isDirectory($path)) {
                return $path;
            }
        }

        return null;
    }
1092580
public function getFilePath($name, $extension = '.php')
    {
        $filename = trim(dotToPath($name), '/') . $extension;
        $file = null;
        foreach ($this->paths as $dir) {
            $realName = nPath($dir, $filename);
            if (file_exists($realName)) {
                $file = $realName;
                break;
            }
        }
        return $file;
    }
578727
public function get($name)
    {
        if (!isset($this->storage[$name]))
        {
            $files = &$this->files();

            if (empty($files[$name]))
            {
                return [];
            }

            foreach ($this->keys($name) as $index => $value)
            {
                $this->simple($name, $index);
            }
        }

        return $this->storage[$name];
    }