PHP Classes

File Size Helper: Determine the file size even if is larger than 2GB

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2012-03-25 (5 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 249 All time: 7,535 This week: 901Up
Version License PHP version Categories
file-size-helper 1.0GNU Lesser Genera...5PHP 5, Files and Folders
Description Author

This class can determine the file size even if is larger than 2GB.

It can use different methods to determine the size of a large file that works when it is larger than 2GB.

Currently it can use as file size detection the PHP filesize() function, the Curl extension, the PHP seek function, a COM extension on Windows or executing an external program on other systems.

Name: Mohamed Elkholy is available for providing paid consulting. Contact Mohamed Elkholy .
Classes: 3 packages by
Country: Egypt Egypt
Age: 27
All time rank: 11169 in Egypt Egypt
Week rank: 980 Up16 in Egypt Egypt Down
Innovation award
Innovation award
Nominee: 1x


## Class for manipulating large files (bigger than 2GB)

This class detects the real file size of a specified file even if the 
file size is begger than 2GB, the class also able to format the resulted
file size in KB, MB, GB, TB units which make it more readable.

The class uses several methods to detect bigger file sizes:
 1. The native filesize() function
 2. Using the cURL module
 3. Using the php native seek function
 4. Windows COM interface (on windows server)
 5. Using external program (exec() function needed)

## Usage


require ("filesizeHelper.php");

$filesizeHelper = new FilesizeHelper();

$file = 'c:\Just.A.Very.Large.File.avi';

$filesize = $filesizeHelper->getFileSize($file);



## Updates & Bugs

To see more details about latest release & bugs, go to this URL:

## Changelog

	- initial release
  Files folder image Files  
File Role Description
Plain text file filesizeHelper.php Class FileSizeHelper class source
Accessible without login Plain text file readme.txt Doc. Documentation & Usage information
Accessible without login Plain text file demo.php Example Demo file
Accessible without login Plain text file license.txt Lic. License file

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:7,535
This week:901Up