You are here

public function MongoFile::chunkExists in One Click Upload 7.2

Parameters

$index int|string 1-based:

Return value

bool

2 calls to MongoFile::chunkExists()
MongoFile::checkChunk in flowphp/src/Flow/Mongo/MongoFile.php
Check if chunk exist
MongoFile::validateFile in flowphp/src/Flow/Mongo/MongoFile.php

File

flowphp/src/Flow/Mongo/MongoFile.php, line 57

Class

MongoFile
Notes:

Namespace

Flow\Mongo

Code

public function chunkExists($index) {
  return $this->config
    ->getGridFs()->chunks
    ->find([
    'files_id' => $this
      ->getGridFsFile()['_id'],
    'n' => intval($index) - 1,
  ])
    ->limit(1)
    ->hasNext();
}