tce_functions_filemanager.php
Tags
Table of Contents
Functions
- F_deleteMediaFile() : true
- Delete the selected media file
- F_renameMediaFile() : true
- Rename the selected media file
- F_createMediaDir() : true
- Create a new media directory inside the cache
- F_deleteMediaDir() : true
- Delete the specified media directory
- F_getFileInfo() : associative
- Get file information
- F_formatFileSize() : string
- Return a formatted file size
- F_getMediaDirPathLink() : an
- Get an html string containing active path of the specified directory with links to subdirectories.
- F_getDirFiles() : an
- Get an associative array of directories and folder inside the specified dir.
- F_isUsedMediaFile() : true
- Return true if the file is used on question or answer descriptions
- F_getDirTable() : html
- Get an html table containing files and subdirs
- F_getDirVisualTable() : html
- Get an html visual list of files and subdirs
- F_getAuthorizedDirs() : a
- Returns a regular expression to match authorised directories.
- F_isAuthorizedDir() : true
- Returns true if the user is authorized to use the specified directory, false otherwise.
Functions
F_deleteMediaFile()
Delete the selected media file
F_deleteMediaFile( $filename)
: true
Parameters
Tags
Return values
true —in case of success, false otherwise
F_renameMediaFile()
Rename the selected media file
F_renameMediaFile( $filename,
$newname)
: true
Parameters
Tags
Return values
true —in case of success, false otherwise
F_createMediaDir()
Create a new media directory inside the cache
F_createMediaDir( $dirname)
: true
Parameters
Tags
Return values
true —in case of success, false otherwise
F_deleteMediaDir()
Delete the specified media directory
F_deleteMediaDir( $dirname)
: true
Parameters
Tags
Return values
true —in case of success, false otherwise
F_getFileInfo()
Get file information
F_getFileInfo( $file)
: associative
Parameters
Tags
Return values
associative —array containing file info or false in case of error
F_formatFileSize()
Return a formatted file size
F_formatFileSize( $size)
: string
Parameters
Tags
Return values
string —formatted size
F_getMediaDirPathLink()
Get an html string containing active path of the specified directory with links to subdirectories.
F_getMediaDirPathLink( $dirpath[,
$viewmode
= true
]) : an
Parameters
Tags
Return values
an —html string
F_getDirFiles()
Get an associative array of directories and folder inside the specified dir.
F_getDirFiles( $dir[,
$rootdir
= K_PATH_CACHE
][,
$authdirs
= ''
]) : an
Parameters
- $dir :
-
(string) the starting directory path
- $rootdir : = K_PATH_CACHE
-
(string) the user root dir.
- $authdirs : = ''
-
(string) regular expression containing the authorized dirs.
Tags
Return values
an —associative array containing sorted 'dirs' and 'files'
F_isUsedMediaFile()
Return true if the file is used on question or answer descriptions
F_isUsedMediaFile( $file)
: true
Parameters
Tags
Return values
true —if the file is used, false otherwise
F_getDirTable()
Get an html table containing files and subdirs
F_getDirTable( $dir[,
$selected
= ''
][,
$params
= ''
][,
$rootdir
= K_PATH_CACHE
][,
$authdirs
= ''
]) : html
Parameters
- $dir :
-
(string) the starting directory path
- $selected : = ''
-
(string) the selected file
- $params : = ''
-
(string) additional parameters to add on links
- $rootdir : = K_PATH_CACHE
-
(string) the user root dir.
- $authdirs : = ''
-
(string) regular expression containing the authorized dirs.
Tags
Return values
html —table
F_getDirVisualTable()
Get an html visual list of files and subdirs
F_getDirVisualTable( $dir[,
$selected
= ''
][,
$params
= ''
][,
$rootdir
= K_PATH_CACHE
][,
$authdirs
= ''
]) : html
Parameters
- $dir :
-
(string) the starting directory path
- $selected : = ''
-
(string) the selected file
- $params : = ''
-
(string) additional parameters to add on links
- $rootdir : = K_PATH_CACHE
-
(string) the user root dir.
- $authdirs : = ''
-
(string) regular expression containing the authorized dirs.
Tags
Return values
html —table
F_getAuthorizedDirs()
Returns a regular expression to match authorised directories.
F_getAuthorizedDirs()
: a
Return values
a —regular expression to match authorised directories.
F_isAuthorizedDir()
Returns true if the user is authorized to use the specified directory, false otherwise.
F_isAuthorizedDir( $dir,
$rootdir[,
$authdirs
= ''
]) : true
Parameters
- $dir :
-
(string) the directory to check.
- $rootdir :
-
(string) the user root dir.
- $authdirs : = ''
-
(string) regular expression containing the authorized dirs.
Return values
true —if the user is authorized to use the specified directory, false otherwise.