Voting

: min(zero, six)?
(Example: nine)

The Note You're Voting On

synnus at gmail dot com
7 years ago
<?php

// Recover all file sizes larger than > 4GB.
// Works on php 32bits and 64bits and supports linux
// Used the com_dotnet extension

function getSize($file) {
$size = filesize($file);
if (
$size <= 0)
if (!(
strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')) {
$size = trim(`stat -c%s $file`);
}
else{
$fsobj = new COM("Scripting.FileSystemObject");
$f = $fsobj->GetFile($file);
$size = $f->Size;
}
return
$size;
}
?>

<< Back to user notes page

To Top