dokeos-library
[ class tree: dokeos-library ] [ index: dokeos-library ] [ all elements ]

Procedural File: fileManage.lib.php

Source Location: /main/inc/lib/fileManage.lib.php



Classes:

FileManager


Page Details:

This is the file manage library for Dokeos.

Include/require it in your code to use its functionality.




Tags:

filesource:  Source Code for this file








check_name_exist [line 118]

- check_name_exist( - $filePath)

Cheks a file or a directory actually exist at this location



Tags:

return:  boolean TRUE if the file or the directory exists boolean FALSE otherwise.
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>


Parameters

-   $filePath   filePath (string) - path of the presume existing file or dir
[ Top ]



copyDirTo [line 341]

- copyDirTo( - $origDirPath, - $destination, [ $move = true])

Move a directory and its content to an other area



Tags:

return:  no return !!
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>


Parameters

-   $origDirPath   (String) - the path of the directory to move
-   $destination   (String) - the path of the new area
   $move  
[ Top ]



dirsize [line 606]

integer dirsize( $root, [boolean $recursive = true], string $path)

to compute the size of the directory



Tags:

return:  size


Parameters

string   $path   path to size
boolean   $recursive   if true , include subdir in total
   $root  
[ Top ]



form_dir_list [line 474]

void form_dir_list( $sourceType, $sourceComponent, $command, $baseWorkDir)

build an html form listing all directories of a given directory



Parameters

   $sourceType  
   $sourceComponent  
   $command  
   $baseWorkDir  
[ Top ]



getextension [line 593]

array getextension( string $filename)

to extract the extention of the filename



Parameters

string   $filename   filename
[ Top ]



index_and_sort_dir [line 453]

- index_and_sort_dir( - $path)

Indexes all the directories and subdirectories contented in a given directory, and sort them alphabetically



Tags:

return:  an array containing the path of all the subdirectories sorted false, if there is no directory
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>
see:  - index_and_sort_dir uses the index_dir() function


Parameters

-   $path   path (string) - directory path of the one to index
[ Top ]



index_dir [line 409]

- index_dir( - $path)

Indexes all the directories and subdirectories contented in a given directory



Tags:

return:  an array containing the path of all the subdirectories
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>


Parameters

-   $path   path (string) - directory path of the one to index
[ Top ]



mkpath [line 531]

a mkpath( sting $path, [boolean $verbose = false], [string $mode = &quot;herit&quot;])

to create missing directory in a gived path



Tags:

return:  resource identifier or FALSE if the query was not executed correctly.
author:  Christophe Gesch� gesche@ipm.ucl.ac.be Claroline Team
author:  KilerCris@Mail.com original function from php manual
since:  28-Aug-2001 09:12


Parameters

sting   $path   wanted path
boolean   $verbose   fix if comments must be printed
string   $mode   fix if chmod is same of parent or default
[ Top ]



move [line 288]

- move( - $source, - $target)

Move a file or a directory to an other area



Tags:

return:  bolean - true if the move succeed bolean - false otherwise.
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>
see:  - move() uses check_name_exist() and copyDirTo() functions


Parameters

-   $source   (String) - the path of file or directory to move
-   $target   (String) - the path of the new area
[ Top ]



my_delete [line 152]

- my_delete( - $file)

Delete a file or a directory



Tags:

return:  bolean - true if the delete succeed bolean - false otherwise.
author:  - Hugues Peeters
see:  - delete() uses check_name_exist() and removeDir() functions


Parameters

-   $file   (String) - the path of file or directory to delete
[ Top ]



my_rename [line 239]

- my_rename( - $filePath, - $newFileName)

Rename a file or a directory



Tags:

return:  boolean - true if succeed
  • boolean - false otherwise
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>
see:  - rename() uses the check_name_exist() and php2phps() functions


Parameters

-   $filePath   (string) - complete path of the file or the directory
-   $newFileName   (string) - new name for the file or the directory
[ Top ]



removeDir [line 188]

true removeDir( string $dir)

removes a directory recursively



Tags:

return:  if OK, otherwise false
author:  Amary <MasterNES@aol.com> (from Nexen.net)
author:  Olivier Brouckaert <oli.brouckaert@skynet.be>


Parameters

string   $dir   directory to remove
[ Top ]



update_db_info [line 46]

void update_db_info( - $action, - $oldPath, [- $newPath = &quot;&quot;])

Update the file or directory path in the document db document table



Tags:

author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>


Parameters

-   $action   action (string) - action type require : 'delete' or 'update'
-   $oldPath   oldPath (string) - old path info stored to change
-   $newPath   newPath (string) - new path info to substitute
[ Top ]



Documentation generated on Thu, 12 Jun 2008 13:28:40 -0500 by phpDocumentor 1.4.1