Copies a file
static boolean
copy
(string $src, string $dest, [string $path = null], [boolean $use_streams = false])
-
string
$src: The path to the source file
-
string
$dest: The path to the destination file
-
string
$path: An optional base path to prefix to the file names
-
boolean
$use_streams: True to use streams
Delete a file or array of files
static boolean
delete
(mixed $file)
-
mixed
$file: The file name or an array of file names
Wrapper for the standard file_exists function
static boolean
exists
(string $file)
Gets the extension of a file name
static string
getExt
(string $file)
-
string
$file: The file name
Returns the name, without any path.
static string
getName
(string $file)
Makes file name safe to use
static string
makeSafe
(string $file)
-
string
$file: The name of the file [not full path]
Moves a file
static boolean
move
(string $src, string $dest, [string $path = ''], [boolean $use_streams = false])
-
string
$src: The path to the source file
-
string
$dest: The path to the destination file
-
string
$path: An optional base path to prefix to the file names
-
boolean
$use_streams: True to use streams
Read the contents of a file
static mixed
read
(string $filename, [boolean $incpath = false], [integer $amount = 0], [integer $chunksize = 8192], [integer $offset = 0])
-
string
$filename: The full file path
-
boolean
$incpath: Use include path
-
integer
$amount: Amount of file to read
-
integer
$chunksize: Size of chunks to read
-
integer
$offset: Offset of the file
Strips the last extension off of a file name
static string
stripExt
(string $file)
-
string
$file: The file name
Moves an uploaded file to a destination folder
static boolean
upload
(string $src, string $dest, [boolean $use_streams = false])
-
string
$src: The name of the php (temporary) uploaded file
-
string
$dest: The path (including filename) to move the uploaded file to
-
boolean
$use_streams: True to use streams
Write contents to a file
static boolean
write
(string $file, string &$buffer, [boolean $use_streams = false])
-
string
$file: The full file path
-
string
&$buffer: The buffer to write
-
boolean
$use_streams: Use streams