Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3 scan dir #85

Merged
merged 19 commits into from
Oct 18, 2023
114 changes: 56 additions & 58 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions src/Storage/Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
abstract class Device
{
/**
* Max chunk size while transfering file from one device to another
* Max chunk size while transferring file from one device to another
*/
protected int $transferChunkSize = 20000000; //20 MB

/**
* Sets the maximum number of keys returned to the response. By default, the action returns up to 1,000 key names.
*/
protected const MAX_PAGE_SIZE = PHP_INT_MAX;

/**
* Set Transfer Chunk Size
*
Expand Down Expand Up @@ -277,9 +282,11 @@ abstract public function getPartitionTotalSpace(): float;
* Get all files and directories inside a directory.
*
* @param string $dir Directory to scan
* @return string[]
* @param int $max
* @param string $continuationToken
* @return array<mixed>
*/
abstract public function getFiles(string $dir): array;
abstract public function getFiles(string $dir, int $max = self::MAX_PAGE_SIZE, string $continuationToken = ''): array;

/**
* Get the absolute path by resolving strings like ../, .., //, /\ and so on.
Expand Down
Loading