private function computeRoleFileContents($dir, $roleName, $outputDir, array &$longPaths)
    {
        $roleFile = "";
        $iterator = $this->getIterator($dir);

        // optimization to inline vendor role files. Since vendor files
        // never change during development, their list can be computed
        // during vendor initialization (composer or bin/vendors scripts)
        // and does not need to be reperformed.
        if (file_exists($dir . '/vendor/azureRoleFiles.txt') && ! in_array("vendor", $this->roleFiles['exclude'])) {

            $roleFile .= file_get_contents($dir . '/vendor/azureRoleFiles.txt');
        }

        $length = strlen($dir) + 1;
        foreach ($iterator as $file) {
            if (is_dir($file)) {
                continue;
            }
            $path = str_replace(DIRECTORY_SEPARATOR, "\\", substr($file, $length));
            $checkPath = sprintf('%s/roles/%s/approot/%s', $outputDir, $roleName, $path);
            if (strlen($checkPath) >= 248) {
                $longPaths[] = $checkPath . " (" . strlen($checkPath) . ")";
            }
            $roleFile .= $path . ";" . $path . "\r\n";
        }

        return $roleFile;
    }
private function computeRoleFileContents($dir, $roleName, $outputDir, array &$longPaths)
    {
        $roleFile = "";
        $iterator = $this->getIterator($dir);

        // optimization to inline vendor role files. Since vendor files
        // never change during development, their list can be computed
        // during vendor initialization (composer or bin/vendors scripts)
        // and does not need to be reperformed.
        if (file_exists($dir . '/vendor/azureRoleFiles.txt') && ! in_array("vendor", $this->roleFiles['exclude'])) {

            $roleFile .= file_get_contents($dir . '/vendor/azureRoleFiles.txt');
        }

        $length = strlen($dir) + 1;
        foreach ($iterator as $file) {
            if (is_dir($file)) {
                continue;
            }
            $path = str_replace(DIRECTORY_SEPARATOR, "\\", substr($file, $length));
            $checkPath = sprintf('%s/roles/%s/approot/%s', $outputDir, $roleName, $path);
            if (strlen($checkPath) >= 248) {
                $longPaths[] = $checkPath . " (" . strlen($checkPath) . ")";
            }
            $roleFile .= $path . ";" . $path . "\r\n";
        }

        return $roleFile;
    }
private function computeRoleFileContents ( $ dir , $ roleName , $ outputDir , array & $ longPaths ) { $ roleFile = "" ; $ iterator = $ this -> getIterator ( $ dir ) ; // optimization to inline vendor role files. Since vendor files // never change during development, their list can be computed // during vendor initialization (composer or bin/vendors scripts) // and does not need to be reperformed. if ( file_exists ( $ dir . '/vendor/azureRoleFiles.txt' ) && ! in_array ( "vendor" , $ this -> roleFiles [ 'exclude' ] ) ) { $ roleFile .= file_get_contents ( $ dir . '/vendor/azureRoleFiles.txt' ) ; } $ length = strlen ( $ dir ) + 1 ; foreach ( $ iterator as $ file ) { if ( is_dir ( $ file ) ) { continue ; } $ path = str_replace ( DIRECTORY_SEPARATOR , "\\" , substr ( $ file , $ length ) ) ; $ checkPath = sprintf ( '%s/roles/%s/approot/%s' , $ outputDir , $ roleName , $ path ) ; if ( strlen ( $ checkPath ) >= 248 ) { $ longPaths [ ] = $ checkPath . " (" . strlen ( $ checkPath ) . ")" ; } $ roleFile .= $ path . ";" . $ path . "\r\n" ; } return $ roleFile ; }
Compute the roleFiles.txt content that is necessary for a given role.

@param string $dir
@param string $roleName
@param string $outputPath
@return string
Compute the roleFiles . txt content that is necessary for a given role .