system/helpers/file.php
Class: file_Core
class file_Core
File helper class.
Methods
file_Core :: mime
public static function mime
Attempt to get the mime type from a file. This method is horribly unreliable, due to PHP being horribly unreliable when it comes to determining the mime-type of a file.
Parameters:
- string filename
- filename
Return:
- string mime-type, if found
- boolean FALSE, if not found
file_Core :: split
public static function split
Split a file into pieces matching a specific size.
Parameters:
- string filename
- file to be split
- string output_dir
- (FALSE) directory to output to, defaults to the same directory as the file
- integer piece_size
- (int 10) size, in MB, for each chunk to be
Return: integer The number of pieces that were created.
file_Core :: join
public static function join
Join a split file into a whole file.
Parameters:
- string filename
- split filename, without .000 extension
- string output
- (FALSE) output filename, if different then an the filename
Return: integer The number of pieces that were joined.