File path: dist/twist/Core/Utilities/File.utility.php
Namespace: Twist\Core\Utilities
Extends: Base
Type: Utility
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.
<?php
//Set the variables for the example
$intBytes = 124;
//Call the function bytesToSize with the example vars
Twist::File() -> bytesToSize($intBytes);
Method | Access | Returns |
---|---|---|
__construct | construct | void |
writeDelayedFiles | public | void |
bytesToSize | public | void |
sanitizeName | public | void |
extension | public | void |
name | public | void |
mimeType | public | void |
mimeTypeInfo | public | void |
mimeTypes | public | void |
findVersion | public | void |
serve | public | void |
upload | public | void |
uploadPUT | public | void |
download | public | void |
hash | public | void |
directoryHash | public | void |
directorySize | public | void |
exists | public | void |
read | public | void |
write | public | void |
remove | public | void |
delete | public | void |
recursiveRemove | public | void |
move | public | void |
copy | public | void |
recursiveCopy | public | void |
recursiveCreate | public | void |
viewExtension | public | void |