Functions not being listed for FilesystemIterator

$files = new FilesystemIterator( 'my-first-website', FilesystemIterator::UNIX_PATHS);
foreach ($files as $file) {
echo $file->getFilename() . ' is ' .$file->getSize() . ' bytes.' . '<br>';
echo $file->get


When typing in the above code to iterate through a directory, I would have expected PhpStorm to be able to give me a list of of functions from the FilesystemIterator.

as I type "echo $file->get" I get the no suggestions popup.

Do I need to configure something to get a list of appropriate functions displayed ???


1 comment
Comment actions Permalink

Hi there,

/** @var SplFileInfo $file */

You can put this line just before or as first line inside the foreach loop.


Please sign in to leave a comment.