public function assign($count = 1, $collection = null, $replication = null, $dataCenter = null) {
        $assignProperties = [ 'count' => $count ];

        if (!is_null($collection)) {
            $assignProperties['collection'] = $collection;
        }

        if (!is_null($replication)) {
            $assignProperties['replication'] = $replication;
        }

        if (!is_null($dataCenter)) {
            $assignProperties['dataCenter'] = $dataCenter;
        }

        $res = $this->client->get($this->buildMasterUrl(self::DIR_ASSIGN), [
            'query' => $assignProperties
        ]);

        if ($res->getStatusCode() != 200) {
            throw new SeaweedFSException('Unexpected response when assigning file: ' . $res->getStatusCode());
        }

        $body = json_decode((string) $res->getBody());

        return new File($body, $this->scheme);
    }