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    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 250 All time: 7,874 This week: 370Up
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.

Picture of Mohamed Elkholy
Name: Mohamed Elkholy is available for providing paid consulting. Contact Mohamed Elkholy .
Classes: 3 packages by
Country: Egypt Egypt
Age: 32
All time rank: 113510 in Egypt Egypt
Week rank: 516 Up10 in Egypt Egypt Equal
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,874
This week:370Up
For more information send a message to info at phpclasses dot org.