TwistPHP Documentation

File

File path: dist/twist/Core/Helpers/File.helper.php
Namespace: Twist\Core\Helpers
Extends: Base

Type: Class

File — Additional file system support that you have always needed but never had. Convert bytes into human readable format, sanitize file names, hash a directory or get its total size in bytes. Recursive file and folder manipulation and the ability to serve files even apply download speed restrictions when running a high traffic site and bandwidth is precious.

Example Usage

<?php
//Set the variables for the example
$intBytes 124;

//Call the function bytesToSize with the example vars
Twist::File() -> bytesToSize($intBytes);

Method List

Method Access Returns
__constructconstructvoid
writeDelayedFilespublicvoid
bytesToSizepublicvoid
sanitizeNamepublicvoid
extensionpublicvoid
namepublicvoid
mimeTypepublicvoid
mimeTypeInfopublicvoid
mimeTypeInfoByMimepublicvoid
mimeTypespublicvoid
findVersionpublicvoid
servepublicvoid
uploadpublicvoid
uploadPUTpublicvoid
downloadpublicvoid
hashpublicvoid
directoryHashpublicvoid
directorySizepublicvoid
existspublicvoid
readpublicvoid
writepublicvoid
removepublicvoid
deletepublicvoid
recursiveRemovepublicvoid
movepublicvoid
copypublicvoid
recursiveCopypublicvoid
recursiveCreatepublicvoid
viewExtensionpublicvoid