Store the uploaded file on a filesystem disk.

@param  string  $path
@param  string  $name
@param  array|string  $options
@return string|false
543422
public function storeAs($path, $name, $options = [])
    {
        if ($this->isModified()) {
            $this->save();
        }

        return parent::storeAs($path, $name, $options);
    }
599396
public function storeFile($filename, $metadata = [], $options = [])
    {
        return $this->collection->storeFile($filename, $metadata, $options);
    }
748928
public function attachFromStorage($path, $name = null, array $options = [])
    {
        return $this->attachFromStorageDisk(null, $path, $name, $options);
    }
598539
public function createPathBuilder($name, array $options = []) {
		$className = App::className($name, 'Storage/PathBuilder', 'PathBuilder');
		if (!class_exists($className)) {
			$className = App::className('Burzum/FileStorage.' . $name, 'Storage/PathBuilder', 'PathBuilder');
		}

		if (!class_exists($className)) {
			throw new RuntimeException(sprintf('Could not find path builder "%s"!', $name));
		}

		$pathBuilder = new $className($options);
		if (!$pathBuilder instanceof PathBuilderInterface) {
			throw new RuntimeException(sprintf('Path builder class "%s" does not implement the PathBuilderInterface interface!', $name));
		}

		return $this->_pathBuilder = $pathBuilder;
	}
744974
public function store($name, $path)
    {
        $rawData = file_get_contents($path);

        $attachment = $this->client->post('attachments.json', [
            'query' => [
                'name' => $name,
            ],
            'body' => $rawData,
            'headers' => [
                'Content-Type' => mime_content_type($path),
                'Content-Length' => filesize($path),
            ],
        ]);

        return $this->response($attachment);
    }
672534
public function pathBuilder($name = null, array $options = []) {
		if ($name instanceof PathBuilderInterface) {
			$this->_pathBuilder = $name;

			return $this->_pathBuilder;
		}

		if ($name !== null) {
			$this->_pathBuilder = $this->createPathBuilder($name, $options);
		}

		return $this->_pathBuilder;
	}
991956
public function put($path = '', $options = array())
    {
        return $this->client->put($this->getPathURI($path),
            $this->addDataToRequest($options, true),
            $this->requestHeader
        );
    }
317463
protected function saveFile($path, $name)
    {
        $filename = $this->getUniqueFilename($name);

        /** @var \oat\oatbox\filesystem\Directory $dir */
        $dir = $this->getServiceManager()->get(FileSystemService::SERVICE_ID)
            ->getDirectory(Queue::FILE_SYSTEM_ID);
        /** @var \oat\oatbox\filesystem\FileSystem $filesystem */
        $filesystem = $dir->getFileSystem();

        $stream = fopen($path, 'r+');
        $filesystem->writeStream($filename, $stream);
        fclose($stream);

        $file = $dir->getFile($filename);
        return $this->getFileReferenceSerializer()->serialize($file);
    }
747608
protected function _mkfile($path, $name) {
		if ($this->tmp) {
			$path = $path.'/'.$name;
			$local = $this->getTempFile();
			$res = touch($local) && ftp_put($this->connect, $path, $local, FTP_ASCII);
			@unlink($local);
			return $res ? $path : false;
		}
		return false;
	}
720743
public static function put($path, $name, $namespaceOrController) {
        $item = new ConfigurationItem($path, $name, ['PUT'], $namespaceOrController);
        self::$configuration[] = $item;
        return $item;
    }
134486
public function attachFromStorageDisk($disk, $path, $name = null, array $options = [])
    {
        $this->diskAttachments[] = [
            'disk' => $disk,
            'path' => $path,
            'name' => $name ?? basename($path),
            'options' => $options,
        ];

        return $this;
    }
928398
public static function save($name, $option = array())
	{
		$obj = self::getInstance($name);
		if ($obj)
		{
			return $obj->save($option);
		}
		else
		{
			return false;
		}
	}
850933
public function file($name, array $options = [])
    {
        return $this->form->file($name, $this->addFormControlClass($this->getFieldOptions($name, $options)));
    }
867659
public static function file($name, $options = [])
    {
        self::exclure($options);

        return self::input('file', $name, null, $options);
    }
344130
public function mkdir($path, $mode, $options)
    {
        return $this
            ->_getOssClient($path)
            ->createObjectDir(AliyunOSS::getBucket(), $this->_getNamePart($path));
    }
600205
public function storePubliclyAs($path, $name, $options = [])
    {
        $options = $this->parseOptions($options);

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

        return $this->storeAs($path, $name, $options);
    }
78266
public function putFileAs($path, $file, $name, $options = [])
    {
        $stream = fopen($file->getRealPath(), 'r+');

        // Next, we will format the path of the file and store the file using a stream since
        // they provide better performance than alternatives. Once we write the file this
        // stream will get closed automatically by us so the developer doesn't have to.
        $result = $this->put(
            $path = trim($path.'/'.$name, '/'), $stream, $options
        );

        if (is_resource($stream)) {
            fclose($stream);
        }

        return $result ? $path : false;
    }