![]() |
FileCollection and addDirectory - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: FileCollection and addDirectory (/showthread.php?tid=81090) |
FileCollection and addDirectory - skeyby - 01-23-2022 Hello, I was trying to use the FileCollection class that is documented at https://codeigniter.com/user_guide/libraries/files.html?highlight=glob#file-collections but I can't get it to work and I don't know if the problem is me or the documentation ![]() I just did something stupid like this in a class that extends a BaseCommand. PHP Code: $Scripts = new \CodeIgniter\HTTP\Files\FileCollection([]); Nothing too fancy. and pretty similar to the example given. Running this I get: Code: Call to undefined method CodeIgniter\HTTP\Files\FileCollection::addDirectory() which frankly seems reasonable since I have nothing called "addDirectory" (neither retainPattern) in my entire source tree. I feel like I'm missing something obvious, can someone give me an hint? Thanks. RE: FileCollection and addDirectory - iRedds - 01-23-2022 \CodeIgniter\HTTP\Files\FileCollection and \CodeIgniter\Files\FileCollection These are different classes. You need a second one. RE: FileCollection and addDirectory - skeyby - 01-23-2022 That gives me Class "CodeIgniter\Files\FileCollection" not found.... This is a grep for "FileCollection" in my project's home: Code: system/HTTP/IncomingRequest.php:use CodeIgniter\HTTP\Files\FileCollection; I don't see any system/Files/FileCollection.php..... ? RE: FileCollection and addDirectory - skeyby - 01-23-2022 Ok, I think I understood: https://github.com/codeigniter4/CodeIgniter4/commits/develop/system/Files/FileCollection.php This is rather new stuff I suppose... I'll update CI and try again. RE: FileCollection and addDirectory - luckmoshy - 01-23-2022 Hi Guys I have mult-input form data and i want to do like: PHP Code: $email = \Config\Services::email(); How do I organize this in Html or text mail? |