You are here

protected function DiskSpaceValidator::areSameLogicalDisk in Automatic Updates 8.2

Checks if two paths are located on the same logical disk.

Parameters

string $root: The path of the project root.

string $vendor: The path of the vendor directory.

Return value

bool TRUE if the project root and vendor directory are on the same logical disk, FALSE otherwise.

1 call to DiskSpaceValidator::areSameLogicalDisk()
DiskSpaceValidator::checkDiskSpace in src/Validator/DiskSpaceValidator.php
Checks that there is enough free space to perform automatic updates.

File

src/Validator/DiskSpaceValidator.php, line 94

Class

DiskSpaceValidator
Validates that there is enough free disk space to do automatic updates.

Namespace

Drupal\automatic_updates\Validator

Code

protected function areSameLogicalDisk(string $root, string $vendor) : bool {
  $root_statistics = $this
    ->stat($root);
  $vendor_statistics = $this
    ->stat($vendor);
  return $root_statistics['dev'] === $vendor_statistics['dev'];
}