tce_functions_filemanager.php

tce_functions_filemanager.php source file reference

Package: com\tecnick\tcexam\admin

Tags

  • file: Functions for TCExam file manager.
  • author: Nicola Asuni
  • since: 2010-09-20

Functions

F_deleteMediaFile()

File: tce_functions_filemanager.php line 29

F_deleteMediaFile(mixed $filename) : true

Parameters

  • $filename : mixed: (string) the file name

Tags

  • author: Nicola Asuni

Return values

true —

in case of success, false otherwise

F_renameMediaFile()

File: tce_functions_filemanager.php line 70

F_renameMediaFile(mixed $filename, mixed $newname) : true

Parameters

  • $filename : mixed: (string) old file name
  • $newname : mixed: (string) new file name

Tags

  • author: Nicola Asuni

Return values

true —

in case of success, false otherwise

F_createMediaDir()

File: tce_functions_filemanager.php line 131

F_createMediaDir(mixed $dirname) : true

Parameters

  • $dirname : mixed: (string) the directory name

Tags

  • author: Nicola Asuni

Return values

true —

in case of success, false otherwise

F_deleteMediaDir()

File: tce_functions_filemanager.php line 160

F_deleteMediaDir(mixed $dirname) : true

Parameters

  • $dirname : mixed: (string) the directory name

Tags

  • author: Nicola Asuni

Return values

true —

in case of success, false otherwise

F_getFileInfo()

File: tce_functions_filemanager.php line 185

F_getFileInfo(mixed $file) : associative

Parameters

  • $file : mixed: (string) the file name

Tags

  • author: Nicola Asuni

Return values

associative —

array containing file info or false in case of error

F_formatFileSize()

File: tce_functions_filemanager.php line 225

F_formatFileSize(mixed $size) : string

Parameters

  • $size : mixed: (int) size in bytes

Tags

  • author: Nicola Asuni

Return values

string —

formatted size

File: tce_functions_filemanager.php line 247

F_getMediaDirPathLink(mixed $dirpath[, mixed $viewmode = true ]) : an

Parameters

  • $dirpath : mixed: (string) the directory path
  • $viewmode : mixed = true: (boolean) true=table, false=visual

Tags

  • author: Nicola Asuni

Return values

an —

html string

F_getDirFiles()

File: tce_functions_filemanager.php line 297

F_getDirFiles(mixed $dir[, mixed $rootdir = K_PATH_CACHE ][, mixed $authdirs = '' ]) : an

Parameters

  • $dir : mixed: (string) the starting directory path
  • $rootdir : mixed = K_PATH_CACHE : (string) the user root dir.
  • $authdirs : mixed = ‘’: (string) regular expression containing the authorized dirs.

Tags

  • author: Nicola Asuni

Return values

an —

associative array containing sorted ‘dirs’ and ‘files’

F_isUsedMediaFile()

File: tce_functions_filemanager.php line 337

F_isUsedMediaFile(mixed $file) : true

Parameters

  • $file : mixed: (string) the file to search

Tags

  • author: Nicola Asuni

Return values

true —

if the file is used, false otherwise

F_getDirTable()

File: tce_functions_filemanager.php line 390

F_getDirTable(mixed $dir[, mixed $selected = '' ][, mixed $params = '' ][, mixed $rootdir = K_PATH_CACHE ][, mixed $authdirs = '' ]) : html

Parameters

  • $dir : mixed: (string) the starting directory path
  • $selected : mixed = ‘’: (string) the selected file
  • $params : mixed = ‘’: (string) additional parameters to add on links
  • $rootdir : mixed = K_PATH_CACHE : (string) the user root dir.
  • $authdirs : mixed = ‘’: (string) regular expression containing the authorized dirs.

Tags

  • author: Nicola Asuni

Return values

html —

table

F_getDirVisualTable()

File: tce_functions_filemanager.php line 496

F_getDirVisualTable(mixed $dir[, mixed $selected = '' ][, mixed $params = '' ][, mixed $rootdir = K_PATH_CACHE ][, mixed $authdirs = '' ]) : html

Parameters

  • $dir : mixed: (string) the starting directory path
  • $selected : mixed = ‘’: (string) the selected file
  • $params : mixed = ‘’: (string) additional parameters to add on links
  • $rootdir : mixed = K_PATH_CACHE : (string) the user root dir.
  • $authdirs : mixed = ‘’: (string) regular expression containing the authorized dirs.

Tags

  • author: Nicola Asuni

Return values

html —

table

F_getAuthorizedDirs()

File: tce_functions_filemanager.php line 620

F_getAuthorizedDirs() : a

Return values

a —

regular expression to match authorised directories.

F_isAuthorizedDir()

File: tce_functions_filemanager.php line 639

F_isAuthorizedDir(mixed $dir, mixed $rootdir[, mixed $authdirs = '' ]) : true

Parameters

  • $dir : mixed: (string) the directory to check.
  • $rootdir : mixed: (string) the user root dir.
  • $authdirs : mixed = ‘’: (string) regular expression containing the authorized dirs.

Return values

true —

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