File System

static functions for reading and manipulating the filesystem

Class Methods

The following methods can be invoked on instances of this class.

chowngrp(mixed strFile, mixed strOwner, string strGroup)

Sets the user and group ownership of a file

chmod(mixed strPath, int iFileMode)

Sets filesytem permissions recursively

move(mixed strSource, string strDest)

Moves a file or folder

copy(mixed strSource, mixed strDest, mixed strOwner, mixed strGroup, mixed bDeleteOld, bool bRecurse)

Copies from src to dest

mkdir(mixed strNewDir, int iMode)

Creates a folder (tree) on disk

delete(mixed strPath)

Deletes an item off disk

dir(mixed strDir, bool bIncludeDots)

Returns a list of all files and folders in a directory

getSize(mixed strFile)

Returns the file size of a file on disk

getSizeFormatted(string strFile)

Returns the file size for a file formatted as a readable string

getFolderSize(string strPath)

Returns the size of a folder

getFolderFileCount(string strPath)

Returns the number of files in a folder (recursive)

__call(mixed strName, array arrArguments)

Magic function to trap calls to undefined functions and throw an exception rather than
a fatal error.

__callStatic(mixed strName, array arrArguments)

Magic function to trap static calls to undefined functions and throw an exception rather
than a fatal error.

classGetFolder()

Returns the folder where the class exists

__set_state(mixed arrValues)

classGetFolderResources()

Returns the folder where the class's resources exist

classGetSrcFile()

Returns the folder where the class exists

classGetSrcHash()

Returns the folder where the class exists

classGetReflection()

Returns the reflection data for the current class

classGetReflectionAnnotation(string strField)

Returns a specific class annotation for the current class

Permissions
Allows to centrally manage the framework file permissions