ImageManager
[ class tree: ImageManager ] [ index: ImageManager ] [ all elements ]

Class: Files

Source Location: /main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/Files.php

Class Overview


File Utilities


Author(s):

  • $Author: Wei Zhuo $

Version:

  • $Id: Files.php 26 2004-03-31 02:35:21Z Wei Zhuo $

Methods



Class Details

[line 21]
File Utilities



Tags:

author:  $Author: Wei Zhuo $
version:  $Id: Files.php 26 2004-03-31 02:35:21Z Wei Zhuo $


[ Top ]


Class Methods


method copyFile [line 35]

string copyFile( string $source, string $destination_dir, string $destination_file, [boolean $unique = true])

Copy a file from source to destination. If unique == true, then if the destination exists, it will be renamed by appending an increamenting counting number.



Tags:

return:  the new copied filename, else error if anything goes bad.


Parameters:

string   $source   where the file is from, full path to the files required
string   $destination_file   name of the new file, just the filename
string   $destination_dir   where the files, just the destination dir, e.g., /www/html/gallery/
boolean   $unique   create unique destination file if true.

[ Top ]

method createFolder [line 84]

boolean createFolder( string $newFolder)

Create a new folder.



Tags:

return:  true if the new folder is created, false otherwise.


Parameters:

string   $newFolder   specifiy the full path of the new folder.

[ Top ]

method delFile [line 109]

boolean delFile( string $file)

Delete a file.



Tags:

return:  true if deleted, false otherwise.


Parameters:

string   $file   file to be deleted

[ Top ]

method delFolder [line 125]

boolean delFolder( string $folder, [boolean $recursive = false])

Delete folder(s), can delete recursively.



Tags:

return:  true if deleted.


Parameters:

string   $folder   the folder to be deleted.
boolean   $recursive   if true, all files and sub-directories are delete. If false, tries to delete the folder, can throw error if the directory is not empty.

[ Top ]

method escape [line 99]

string escape( string $filename)

Escape the filenames, any non-word characters will be replaced by an underscore.



Tags:

return:  the escaped safe filename


Parameters:

string   $filename   the orginal filename

[ Top ]

method fixPath [line 167]

string fixPath( string $path)

Append a / to the path if required.



Tags:

return:  path with trailing /


Parameters:

string   $path   the path

[ Top ]

method formatSize [line 211]

string formatSize( int $size)

Format the file size, limits to Mb.



Tags:

return:  formated file size.


Parameters:

int   $size   the raw filesize

[ Top ]

method makeFile [line 196]

string makeFile( string $pathA, string $pathB)

Similar to makePath, but the second parameter is not only a path, it may contain say a file ending.



Tags:

return:  combined file path.


Parameters:

string   $pathA   the leading path
string   $pathB   the ending path with file

[ Top ]

method makePath [line 181]

string makePath( string $pathA, string $pathB)

Concat two paths together. Basically $pathA+$pathB



Tags:

return:  a trailing slash combinded path.


Parameters:

string   $pathA   path one
string   $pathB   path two

[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:29:02 -0500 by phpDocumentor 1.4.1