On Friday 09 November 2007 15:02, Alexandru Stanoi wrote:
> Hi all,
>
> Commit 6220 added the copyRecursive() static method to ezcBaseFile.
>
> static public function copyRecursive( $source, $destination, $depth =
> -1, $dirMode = 0775, $fileMode = 0664 )
>
> On IRC it was discussed that maybe there are too many arguments to this
> function and maybe we can split this function into copyRecursive and
> chmodRecursive (so copyRecursive only has 3 arguments). Kore asked me to
> do this, but I kind of forgot about it until now.
>
> static public function copyRecursive( $source, $destination, $depth = -1 )
>
> static public function chmodRecursive( $dir, $depth = -1, $dirMode =
> 0775, $fileMode = 0664 )
>
> Which is the best solution? (You've guessed, voting time again!)
>
> 1) Keep the copyRecursive method as it is.
>
> 2) Split it into copyRecursive and chmodRecursive (is there a BC break
> here as we need to remove the last 2 arguments of copyRecursive?).

What about an Iterator and Algorithm function?
E.g.

getPathIterator($source, $depth)
copyFiles($sourceItr, $targetPath, $dirMode, $fileMode)
chmodFiles($sourceItr, $dirMode, $fileMode)

(Maybe $dirMode and $fileMode, can be combined in an object / struct).

Raymond.



-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to