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

Procedural File: fileDisplay.lib.php

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



Page Details:

This is the file display library for Dokeos.

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










array_search [line 55]

- array_search( - $needle, - $haystack)

Searches haystack for needle and returns the key if it is found in the array, FALSE otherwise.

Natively implemented in PHP since 4.0.5 version. This function is intended for previous version.




Tags:

return:  array key or FALSE
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>
see:  - http://www.php.net/array_search


Parameters

-   $needle   needle (mixed)
-   $haystack   haystack (array)
[ Top ]



choose_image [line 77]

- choose_image( - $file_name)

Define the image to display for each file extension.

This needs an existing image repository to work.




Tags:

return:  The gif image to chose
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>


Parameters

-   $file_name   (string) - Name of a file
[ Top ]



folder_size [line 230]

- folder_size( - $dir_name)

Get the total size of a directory.



Tags:

return:  Total size in bytes


Parameters

-   $dir_name   (string) - Path of the dir on the hard disk
[ Top ]



format_date [line 172]

- format_date( - $date)

Transform a UNIX time stamp in human readable format date.



Tags:

return:  A human readable representation of the UNIX date
author:  - Hugues Peeters <peeters@ipm.ucl.ac.be>


Parameters

-   $date   - UNIX time stamp
[ Top ]



format_file_size [line 143]

- format_file_size( - $file_size)

Transform the file size in a human readable format.



Tags:

return:  A human readable representation of the file size


Parameters

-   $file_size   (int) - Size of the file in bytes
[ Top ]



format_url [line 183]

- format_url( - $file_path)

Transform the file path to a URL.



Tags:

return:  Relative url


Parameters

-   $file_path   (string) - Relative local path of the file on the hard disk
[ Top ]



get_total_folder_size [line 261]

Total get_total_folder_size( string $path, [boolean $can_see_invisible = false])

Calculates the total size of a directory by adding the sizes (that are stored in the database) of all files & folders in this directory.



Tags:

return:  size


Parameters

string   $path  
boolean   $can_see_invisible  
[ Top ]



recent_modified_file_time [line 199]

- recent_modified_file_time( - $dir_name, [- $do_recursive = true])

Get the most recent time the content of a folder was changed.



Tags:

return:  Time the content of the folder was changed


Parameters

-   $dir_name   (string) - Path of the dir on the hard disk
-   $do_recursive   (bool) - Traverse all folders in the folder?
[ Top ]



Documentation generated on Wed, 05 Sep 2007 06:14:40 +0200 by phpDocumentor 1.4.0