public function FileCommited::getSizes in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7
File
- vendor/
edsdk/ file-uploader-server-php/ src/ lib/ file/ FileCommited.php, line 106
Class
Namespace
EdSDK\FileUploaderServer\lib\fileCode
public function getSizes() {
$thisFileFullPath = $this
->getFullPath();
$thisName = $this
->getNameWithoutExt();
$thisFileDir = dirname($this);
$files = array_diff(scandir($thisFileDir), array(
'..',
'.',
));
$sizes = [];
for ($i = 0; $i < count($files); $i++) {
$file = $files[$i];
$name = basename($file);
$ext = Utils::getExt($name);
if ($ext != null) {
$name = substr($name, 0, strlen($name) - strlen($ext) - 1);
}
if ($thisFileFullPath !== $file && strpos($name, $thisName . "-") === 0) {
$sizes[] = substr($name, strlen($thisName) + 1);
}
}
return $sizes;
}