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,812 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 <contact>
Classes: 3 packages by
Country: Egypt Egypt
Innovation award
Innovation award
Nominee: 1x

Details
FileSizeHelper
==================

## 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

<?php

require ("filesizeHelper.php");

$filesizeHelper = new FilesizeHelper();

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

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

var_dump($filesize);

?>

## Updates & Bugs

To see more details about latest release & bugs, go to this URL:
https://github.com/blasten/turn.js/issue

## Changelog

v1.0
	- 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  
 0%
Total:250
This week:0
All time:7,812
This week:370Up

For more information send a message to info at phpclasses dot org.