So at the top of the controller you could do

uses('folder','file');  // loads the classes for Folder and File


then in the controller to get an array of readable folders in a path you could do....

$path = WWW_ROOT.DS.'dev'.DS.'birdlists'.DS.$filename;
$folder = new Folder($path);
$ls = $folder->ls();
foreach ($ls[1] as $filename) {
       $file = new File ($path.DS.$filename);
        if ($file->readable()) {
                $listForDisplay[$filename] = $path.DS.$filename;
          }
}

On 5/3/06, Atkati <[EMAIL PROTECTED]> wrote:

I can't understand how to use the Folder class...
Can you tell me how to use it or a place where it is explained ?




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to