tce__functions__filemanager_8php

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
tce_functions_filemanager.php File Reference

Namespaces

 com\tecnick\tcexam\admin
 TCExam Administration Area.
 

Functions

 F_deleteMediaFile ($filename)
 
 F_renameMediaFile ($filename, $newname)
 
 F_createMediaDir ($dirname)
 
 F_deleteMediaDir ($dirname)
 
 F_getFileInfo ($file)
 
 F_formatFileSize ($size)
 
 F_getMediaDirPathLink ($dirpath, $viewmode=true)
 
 F_getDirFiles ($dir, $rootdir=K_PATH_CACHE, $authdirs=“)
 
 F_isUsedMediaFile ($file)
 
 F_getDirTable ($dir, $selected=“, $params=”, $rootdir=K_PATH_CACHE, $authdirs=“)
 
 F_getDirVisualTable ($dir, $selected=“, $params=”, $rootdir=K_PATH_CACHE, $authdirs=“)
 
 F_getAuthorizedDirs ()
 
 F_isAuthorizedDir ($dir, $rootdir, $authdirs=“)
 

Detailed Description

Functions for TCExam file manager.

Function Documentation

F_createMediaDir (   $dirname)

Create a new media directory inside the cache

Author
Nicola Asuni
Parameters
$dirname(string) the directory name
Returns
true in case of success, false otherwise

F_deleteMediaDir (   $dirname)

Delete the specified media directory

Author
Nicola Asuni
Parameters
$dirname(string) the directory name
Returns
true in case of success, false otherwise

F_deleteMediaFile (   $filename)

Delete the selected media file

Author
Nicola Asuni
Parameters
$filename(string) the file name
Returns
true in case of success, false otherwise

F_formatFileSize (   $size)

Return a formatted file size

Author
Nicola Asuni
Parameters
$size(int) size in bytes
Returns
string formatted size

F_getAuthorizedDirs ( )

Returns a regular expression to match authorised directories.

Returns
a regular expression to match authorised directories.

F_getDirFiles (   $dir,
  $rootdir = K_PATH_CACHE,
  $authdirs =  
)

Get an associative array of directories and folder inside the specified dir.

Author
Nicola Asuni
Parameters
$dir(string) the starting directory path
$rootdir(string) the user root dir.
$authdirs(string) regular expression containing the authorized dirs.
Returns
an associative array containing sorted ‘dirs’ and ‘files’

F_getDirTable (   $dir,
  $selected = ,
  $params = ,
  $rootdir = K_PATH_CACHE,
  $authdirs =  
)

Get an html table containing files and subdirs

Author
Nicola Asuni
Parameters
$dir(string) the starting directory path
$selected(string) the selected file
$params(string) additional parameters to add on links
$rootdir(string) the user root dir.
$authdirs(string) regular expression containing the authorized dirs.
Returns
html table

F_getDirVisualTable (   $dir,
  $selected = ,
  $params = ,
  $rootdir = K_PATH_CACHE,
  $authdirs =  
)

Get an html visual list of files and subdirs

Author
Nicola Asuni
Parameters
$dir(string) the starting directory path
$selected(string) the selected file
$params(string) additional parameters to add on links
$rootdir(string) the user root dir.
$authdirs(string) regular expression containing the authorized dirs.
Returns
html table

F_getFileInfo (   $file)

Get file information

Author
Nicola Asuni
Parameters
$file(string) the file name
Returns
associative array containing file info or false in case of error

F_getMediaDirPathLink (   $dirpath,
  $viewmode = true 
)

Get an html string containing active path of the specified directory with links to subdirectories.

Author
Nicola Asuni
Parameters
$dirpath(string) the directory path
$viewmode(boolean) true=table, false=visual
Returns
an html string

F_isAuthorizedDir (   $dir,
  $rootdir,
  $authdirs =  
)

Returns true if the user is authorized to use the specified directory, false otherwise.

Parameters
$dir(string) the directory to check.
$rootdir(string) the user root dir.
$authdirs(string) regular expression containing the authorized dirs.
Returns
true if the user is authorized to use the specified directory, false otherwise.

F_isUsedMediaFile (   $file)

Return true if the file is used on question or answer descriptions

Author
Nicola Asuni
Parameters
$file(string) the file to search
Returns
true if the file is used, false otherwise

F_renameMediaFile (   $filename,
  $newname 
)

Rename the selected media file

Author
Nicola Asuni
Parameters
$filename(string) old file name
$newname(string) new file name
Returns
true in case of success, false otherwise

 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy