You are here

protected function Filesystem::areSameLogicalDisk in Automatic Updates 8

Determine if the root and vendor file system are the same logical disk.

Parameters

string $root: Root file path.

string $vendor: Vendor file path.

Return value

bool TRUE if same file system, FALSE otherwise.

2 calls to Filesystem::areSameLogicalDisk()
DiskSpace::diskSpaceCheck in src/ReadinessChecker/DiskSpace.php
Check if the filesystem has sufficient disk space.
ReadOnlyFilesystem::readOnlyCheck in src/ReadinessChecker/ReadOnlyFilesystem.php
Check if the filesystem is read only.
2 methods override Filesystem::areSameLogicalDisk()
TestDiskSpaceNonSameDisk::areSameLogicalDisk in tests/src/Kernel/ReadinessChecker/DiskSpaceTest.php
Determine if the root and vendor file system are the same logical disk.
TestReadOnlyFileSystem::areSameLogicalDisk in tests/src/Kernel/ReadinessChecker/ReadOnlyFilesystemTest.php
Determine if the root and vendor file system are the same logical disk.

File

src/ReadinessChecker/Filesystem.php, line 93

Class

Filesystem
Base class for filesystem checkers.

Namespace

Drupal\automatic_updates\ReadinessChecker

Code

protected function areSameLogicalDisk($root, $vendor) {
  $root_statistics = stat($root);
  $vendor_statistics = stat($vendor);
  return $root_statistics && $vendor_statistics && $root_statistics['dev'] === $vendor_statistics['dev'];
}