core/console/commands/ImportController.php
protected function scanDirectoryFiles($path, $ns, $module)
    {
        $files = [];
        foreach (scandir($path) as $file) {
            if (substr($file, 0, 1) !== '.') {
                $files[] = [
                    'file' => $file,
                    'module' => $module,
                    'ns' => $ns.'\\'.pathinfo($file, PATHINFO_FILENAME),
                ];
            }
        }
        
        return $files;
    }
protected function scanDirectoryFiles($path, $ns, $module)
    {
        $files = [];
        foreach (scandir($path) as $file) {
            if (substr($file, 0, 1) !== '.') {
                $files[] = [
                    'file' => $file,
                    'module' => $module,
                    'ns' => $ns.'\\'.pathinfo($file, PATHINFO_FILENAME),
                ];
            }
        }
        
        return $files;
    }
protected function scanDirectoryFiles ( $ path , $ ns , $ module ) { $ files = [ ] ; foreach ( scandir ( $ path ) as $ file ) { if ( substr ( $ file , 0 , 1 ) !== '.' ) { $ files [ ] = [ 'file' => $ file , 'module' => $ module , 'ns' => $ ns . '\\' . pathinfo ( $ file , PATHINFO_FILENAME ) , ] ; } } return $ files ; }
Scan a given directory path and return an array with namespace, module and file.

@param string $path
@param string $ns
@param string $module The name/id of the module.
@return array
Scan a given directory path and return an array with namespace module and file .