-
Notifications
You must be signed in to change notification settings - Fork 176
/
ChunkManagerInterface.php
40 lines (31 loc) · 1.06 KB
/
ChunkManagerInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
declare(strict_types=1);
namespace Oneup\UploaderBundle\Uploader\Chunk;
use Symfony\Component\HttpFoundation\File\UploadedFile;
interface ChunkManagerInterface
{
/**
* Adds a new Chunk to a given uuid.
*/
public function addChunk(string $uuid, int $index, UploadedFile $chunk, string $original): mixed;
/**
* Assembles the given chunks and return the resulting file.
*
* @param bool $removeChunk remove the chunk file once its assembled
* @param bool $renameChunk rename the chunk file once its assembled
*/
public function assembleChunks(mixed $chunks, bool $removeChunk = true, bool $renameChunk = false): mixed;
/**
* Get chunks associated with the given uuid.
*/
public function getChunks(string $uuid): mixed;
/**
* Clean a given path.
*/
public function cleanup(string $path): void;
/**
* Clears the chunk manager directory. Remove all files older than the configured maxage.
*/
public function clear(): void;
public function getLoadDistribution(): bool;
}