| Moodle APIs 4.3
    Moodle 4.3.6 (Build: 20240812) | 
| Functions | |
| copyr ($source, $dest) | |
| Copy a file, or recursively copy a folder and its contents. | |
| fullPath ($path, $dirsep=DIRECTORY_SEPARATOR) | |
| Function expands all relative parts of supplied path string thus removing things like ../../ or . | |
| getCourseDirs ($rootDir, $contains, $excludeitems=null, $startswith=true) | |
| Function returns array with directories contained in folder (only first level) simmilar to getDirectories but returned items are naturally sorted. | |
| getDirectories ($rootDir, $contains, $excludeitems=null, $startswith=true) | |
| Function returns array with directories contained in folder (only first level) | |
| GetFiles ($startDir, $outfile, $rootDir='', $excludedirs=null, $excludefileext=null) | |
| GetFilesArray ($startDir, $rootDir='', $excludedirs=null, $excludefileext=null) | |
| Function to get an array with all files in a directory and subdirectories. | |
| getFilesOnly ($rootDir, $contains, $excludeitems=null, $startswith=true, $extension=null) | |
| getRawFiles ($startDir, &$fhandle, $rootDir='', $excludedirs=null, $excludefileext=null) | |
| Function returns files recursivly with appeneded relative path. | |
| getRawFiles2 ($startDir, &$arr, $rootDir='', $excludedirs=null, $excludefileext=null) | |
| pathDiff ($path1, $path2) | |
| Returns relative path from two directories with full path. | |
| rmdirr ($dirname) | |
| Delete a directory recursive with files inside. | |
| search_ident_by_name ($array, $name) | |
| Search an identifier in array. | |
| stripUrl ($path, $rootDir='') | |
| Function strips url part from css link. | |
| toNativePath (&$path) | |
| Converts direcotry separator in given path to / to validate in CC Value is passed byref hence variable itself is changed. | |
| toNativePath2 (&$path) | |
| Converts direcotry separator in given path to the one on the server platform Value is passed byref hence variable itself is changed. | |
| toUrlPath (&$path) | |
| Converts Directory separator to the / more suitable for URL. | |
| copyr | ( | $source, | |
| $dest ) | 
Copy a file, or recursively copy a folder and its contents.
| string | $source | Source path | 
| string | $dest | Destination path | 
| bool | Returns TRUE on success, FALSE on failure | 
| fullPath | ( | $path, | |
| $dirsep = DIRECTORY_SEPARATOR ) | 
Function expands all relative parts of supplied path string thus removing things like ../../ or .
/../.
| string | $path | |
| string | $dirsep | Character that represents directory separator should be specified here. Default is DIRECTORY_SEPARATOR. | 
| string | 
| getCourseDirs | ( | $rootDir, | |
| $contains, | |||
| $excludeitems = null, | |||
| $startswith = true ) | 
Function returns array with directories contained in folder (only first level) simmilar to getDirectories but returned items are naturally sorted.
| string | $rootDir | |
| string | $contains | |
| array | $excludeitems | |
| bool | $startswith | 
| array | 
| getDirectories | ( | $rootDir, | |
| $contains, | |||
| $excludeitems = null, | |||
| $startswith = true ) | 
Function returns array with directories contained in folder (only first level)
| string | $rootDir | directory to look into | 
| string | $contains | which string to look for | 
| array | $excludeitems | array of names to be excluded | 
| bool | $startswith | should the $contains value be searched only from beginning | 
| array | Returns array of sub-directories. In case $rootDir path is invalid it returns FALSE. | 
| GetFilesArray | ( | $startDir, | |
| $rootDir = '', | |||
| $excludedirs = null, | |||
| $excludefileext = null ) | 
Function to get an array with all files in a directory and subdirectories.
| string | $startDir | |
| string | $rootDir | |
| string | $excludedirs | |
| string | $excludefileext | 
| array | 
| getRawFiles | ( | $startDir, | |
| & | $fhandle, | ||
| $rootDir = '', | |||
| $excludedirs = null, | |||
| $excludefileext = null ) | 
Function returns files recursivly with appeneded relative path.
| string | $startDir | |
| string | $rootDir | |
| array | $excludedirs | |
| array | $excludefileext | 
| array | 
| pathDiff | ( | $path1, | |
| $path2 ) | 
Returns relative path from two directories with full path.
| string | $path1 | |
| string | $path2 | 
| string | 
| rmdirr | ( | $dirname | ) | 
Delete a directory recursive with files inside.
| string | $dirname | 
| bool | 
| search_ident_by_name | ( | $array, | |
| $name ) | 
Search an identifier in array.
| array | $array | |
| string | $name | 
| stripUrl | ( | $path, | |
| $rootDir = '' ) | 
Function strips url part from css link.
| string | $path | |
| string | $rootDir | 
| string | 
| toNativePath | ( | & | $path | ) | 
Converts direcotry separator in given path to / to validate in CC Value is passed byref hence variable itself is changed.
| string | $path | 
| toNativePath2 | ( | & | $path | ) | 
Converts direcotry separator in given path to the one on the server platform Value is passed byref hence variable itself is changed.
| string | $path | 
| toUrlPath | ( | & | $path | ) | 
Converts Directory separator to the / more suitable for URL.
| string | $path |