LargeFileHelper

class OC\LargeFileHelper
Helper class for large files on 32-bit platforms.
Source:lib/private/LargeFileHelper.php#38

Constants

POW_2_53 = 9007199254740992
pow(2, 53) as a base-10 string.
Source:lib/private/LargeFileHelper.php#43
Type:string
POW_2_53_MINUS_1 = 9007199254740991
pow(2, 53) - 1 as a base-10 string.
Source:lib/private/LargeFileHelper.php#49
Type:string

Methods

public OC\LargeFileHelper::__construct()
Source:lib/private/LargeFileHelper.php#57
Throws:\RunTimeException if our assumptions do not hold on the current PHP platform.
public OC\LargeFileHelper::formatUnsignedInteger($number)
Source:

lib/private/LargeFileHelper.php#77

Parameters:
  • $number (int | float | string) Number containing unsigned integer data
Throws:

\UnexpectedValueException if $number is not a float, not an int and not a base-10 string.

Returns:

string Unsigned integer base-10 string

public OC\LargeFileHelper::getFileSize($filename)
Source:

lib/private/LargeFileHelper.php#102

Parameters:
  • $filename (string) Path to the file.
Returns:

null | int | float Number of bytes as number (float or int) or null on failure.

public OC\LargeFileHelper::getFileSizeViaCurl($fileName)
Source:

lib/private/LargeFileHelper.php#122

Parameters:
  • $fileName (string) Path to the file.
Returns:

null | int | float Number of bytes as number (float or int) or null on failure.

public OC\LargeFileHelper::getFileSizeViaExec($filename)
Source:

lib/private/LargeFileHelper.php#150

Parameters:
  • $filename (string) Path to the file.
Returns:

null | int | float Number of bytes as number (float or int) or null on failure.

public OC\LargeFileHelper::getFileSizeNative($filename)
Source:

lib/private/LargeFileHelper.php#175

Parameters:
  • $filename (string) Path to the file.
Returns:

int | float Number of bytes as number (float or int).

public OC\LargeFileHelper::getFileMtime($fullPath)
Returns the current mtime for $fullPath
Source:

lib/private/LargeFileHelper.php#192

Parameters:
  • $fullPath (string)
Returns:

int

protected OC\LargeFileHelper::exec($cmd)
Source:lib/private/LargeFileHelper.php#209