Class FileFunctions
A library for manipulating files, directories and paths
Located in /class.filefunctions.php (line 24)
This method takes the name of a file, and creates a new file name using microtime() as the file name, and the original file's extension as the extension.
- string $sBase: The base file name to use as an example
Similar to CreateFileNameFrom(), this method also accepts a string to append to the timestamp in order to help ensure a more unique name when files are created at the exact same time, or in rapid succession.
- string $sBase: The name of the original file, used to get the file extension
- string $sString: The string to add to the time to ensure a more unique name
Creates a temporary directory in the systems temporary directory (determined by the sys_get_temp_dir()). This directory name is the first 8 characters of the the md5 hash of the current microtime().
Attempts to find the specified file name in the include path. Loops each path in the include path, and, upon the first result, returns the absolute path to the file.
- string $sFileName: The file name to attempt to find in the include path
Determines the base name of a file by removing the directory structure before it, as well as the extension of the file. Passing /path/to/file.ext will return "file"
- string $sFileName: The name of the file
Determines the file extension of the given file name. File extension is determined to be any characters after the last period (.)
- string $sFileName: The name of the file
- $sFilename
Determines the mime type of the given file. This method uses the FileInfo extension of PHP and may not always be accurate in determining the mime type of all files. FileInfo must be installed for this to work properly.
- string $sFileName: The name of the file
This method takes information about an uploaded file through _FILES and gives the file a unique name using microtime() and the extension of the original file name, as well as moves that file from the temporary path to a specified folder.
- string $sTmpFile: The absolute path to the temp file uploaded via _FILES
- string $sUploadName: The name of the uploaded file to determine the file extension
- string $sDirectory: The path to the directory to store the new file
Returns a human readable file size format in the form of #.## (bytes|KB|MB|GB)
- integer $iSizeInBytes: The file size in bytes
Moves a specified directory to a new location, recursively. The need for this method arises from the fact that the native php rename() function cannot move files or directories across partitions on Windows systems.
- string $sOldDirectory: The directory to recursively move
- string $sNewDirectory: The new directory to move the old directory to
Removes the specified directory and all of it's contents, recursively. The need for this method arises from the native php rmdir() not being able to delete a directory if there are files in it.
- string $sPath: The name of the directory to remove (recursively)
Documentation generated on Thu, 25 Feb 2010 15:59:40 -0500 by phpDocumentor 1.4.3

